1
0
Fork 0

Merge migrations

This commit is contained in:
Alex Kotov 2019-07-20 05:08:50 +05:00
parent 289958669a
commit 648ce03d23
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 11 additions and 16 deletions

View file

@ -69,6 +69,17 @@ class DeviseCreateUsers < ActiveRecord::Migration[5.2]
t.index :name, unique: true t.index :name, unique: true
end end
create_table :user_omniauths do |t|
t.timestamps null: false
t.references :user, foreign_key: true
t.string :provider, null: false
t.string :remote_id, null: false
t.string :email, null: false
t.index %i[remote_id provider], unique: true
end
add_foreign_key :users, :accounts add_foreign_key :users, :accounts
add_foreign_key :account_roles, :accounts add_foreign_key :account_roles, :accounts
add_foreign_key :account_roles, :roles add_foreign_key :account_roles, :roles

View file

@ -1,16 +0,0 @@
# frozen_string_literal: true
class CreateUserOmniauths < ActiveRecord::Migration[5.2]
def change
create_table :user_omniauths do |t|
t.timestamps null: false
t.references :user, foreign_key: true
t.string :provider, null: false
t.string :remote_id, null: false
t.string :email, null: false
t.index %i[remote_id provider], unique: true
end
end
end