Skip to content

Commit

Permalink
Migration: add expires_at to access_tokens (#3946)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlledom authored Nov 21, 2024
1 parent 3c65d41 commit 48f32d6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions db/migrate/20241107134140_add_expires_at_to_access_tokens.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class AddExpiresAtToAccessTokens < ActiveRecord::Migration[6.1]
disable_ddl_transaction! if System::Database.postgres?

def change
add_column :access_tokens, :expires_at, :datetime
end
end
3 changes: 2 additions & 1 deletion db/oracle_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_07_26_111800) do
ActiveRecord::Schema.define(version: 2024_11_07_134140) do

create_table "access_tokens", force: :cascade do |t|
t.integer "owner_id", precision: 38, null: false
Expand All @@ -21,6 +21,7 @@
t.integer "tenant_id", precision: 38
t.datetime "created_at", precision: 6
t.datetime "updated_at", precision: 6
t.datetime "expires_at", precision: 6
end

create_table "accounts", force: :cascade do |t|
Expand Down
3 changes: 2 additions & 1 deletion db/postgres_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_07_26_111800) do
ActiveRecord::Schema.define(version: 2024_11_07_134140) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand All @@ -24,6 +24,7 @@
t.bigint "tenant_id"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "expires_at"
end

create_table "accounts", force: :cascade do |t|
Expand Down
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_07_26_111800) do
ActiveRecord::Schema.define(version: 2024_11_07_134140) do

create_table "access_tokens", charset: "utf8mb3", collation: "utf8mb3_bin", force: :cascade do |t|
t.bigint "owner_id", null: false
Expand All @@ -21,6 +21,7 @@
t.bigint "tenant_id"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "expires_at"
t.index ["owner_id"], name: "idx_auth_tokens_of_user"
t.index ["value", "owner_id"], name: "idx_value_auth_tokens_of_user", unique: true
end
Expand Down

0 comments on commit 48f32d6

Please sign in to comment.