feat(api_token): add api_tokens table
This commit is contained in:
parent
040009f2c9
commit
47f716f9fa
3 changed files with 53 additions and 1 deletions
11
db/migrate/20221129104327_create_api_tokens.rb
Normal file
11
db/migrate/20221129104327_create_api_tokens.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class CreateAPITokens < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :api_tokens, id: :uuid do |t|
|
||||
t.references :administrateur, null: false, foreign_key: true
|
||||
t.string :encrypted_token, null: false
|
||||
t.string :name, null: false
|
||||
t.integer :version, null: false, default: 3
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue