Files
old-holivud2/db/migrate/20191126155350_create_account_auths.rb
2020-05-31 22:38:19 +02:00

18 lines
423 B
Ruby

class CreateAccountAuths < ActiveRecord::Migration[6.0]
def change
create_table :account_auths do |t|
t.integer :user_id
t.integer :account_id
t.integer :role
t.timestamps
end
rename_column :users, :role, :role_old
rename_column :users, :account_id, :account_id_old
change_column_null(:users, :role_old, true)
change_column_null(:users, :account_id_old, true)
end
end