update tokens

This commit is contained in:
Chris
2025-11-12 01:01:03 -05:00
parent 774d64b98c
commit 43237df2b8
6 changed files with 16 additions and 4 deletions

View File

@@ -2,10 +2,12 @@ class CreateApiTokens < ActiveRecord::Migration[7.2]
def change
create_table :api_tokens do |t|
t.references :user, null: false, foreign_key: true
t.string :name, null: false
t.string :access_token, null: false
t.datetime :last_used_at
t.datetime :expires_at
t.timestamps
end
add_index :api_tokens, :access_token, unique: true
end
end