demarches-normaliennes/db/migrate/20190201164951_create_trusted_device_tokens.rb

12 lines
307 B
Ruby
Raw Normal View History

2019-02-01 18:11:55 +01:00
class CreateTrustedDeviceTokens < ActiveRecord::Migration[5.2]
def change
create_table :trusted_device_tokens do |t|
t.string :token, null: false
t.references :gestionnaire, foreign_key: true
t.timestamps
end
add_index :trusted_device_tokens, :token, unique: true
end
end