From 28e4e1be2e2c0083c3e41d76b13216071398b671 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 17 Jan 2024 09:09:30 +0100 Subject: [PATCH] features(api): add expires_at to api_token --- .../20240116155926_add_expires_at_column_to_api_token.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20240116155926_add_expires_at_column_to_api_token.rb diff --git a/db/migrate/20240116155926_add_expires_at_column_to_api_token.rb b/db/migrate/20240116155926_add_expires_at_column_to_api_token.rb new file mode 100644 index 000000000..2dffc16c4 --- /dev/null +++ b/db/migrate/20240116155926_add_expires_at_column_to_api_token.rb @@ -0,0 +1,5 @@ +class AddExpiresAtColumnToAPIToken < ActiveRecord::Migration[7.0] + def change + add_column :api_tokens, :expires_at, :date + end +end diff --git a/db/schema.rb b/db/schema.rb index 89de42424..f81fb674a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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