20190316190352_create_account_identity_proofs.rb 672 B

12345678910111213141516
  1. class CreateAccountIdentityProofs < ActiveRecord::Migration[5.2]
  2. def change
  3. create_table :account_identity_proofs do |t|
  4. t.belongs_to :account, foreign_key: { on_delete: :cascade }
  5. t.string :provider, null: false, default: ''
  6. t.string :provider_username, null: false, default: ''
  7. t.text :token, null: false, default: ''
  8. t.boolean :verified, null: false, default: false
  9. t.boolean :live, null: false, default: false
  10. t.timestamps null: false
  11. end
  12. add_index :account_identity_proofs, [:account_id, :provider, :provider_username], unique: true, name: :index_account_proofs_on_account_and_provider_and_username
  13. end
  14. end