features(api): add expires_at to api_token

This commit is contained in:
simon lehericey 2024-01-17 09:09:30 +01:00
parent d8bc38bc69
commit 28e4e1be2e
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,5 @@
class AddExpiresAtColumnToAPIToken < ActiveRecord::Migration[7.0]
def change
add_column :api_tokens, :expires_at, :date
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2024_01_10_113623) do
ActiveRecord::Schema[7.0].define(version: 2024_01_16_155926) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@ -103,6 +103,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_01_10_113623) do
t.datetime "updated_at", null: false
t.integer "version", default: 3, null: false
t.boolean "write_access", default: true, null: false
t.date "expires_at"
t.index ["administrateur_id"], name: "index_api_tokens_on_administrateur_id"
end