Fix Rails/BulkChangeTable
cop (#26890)
This commit is contained in:
parent
0c4e7c06dc
commit
c501d626e8
31 changed files with 208 additions and 107 deletions
|
@ -2,8 +2,10 @@
|
|||
|
||||
class AddOwnerToApplication < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :oauth_applications, :owner_id, :integer, null: true
|
||||
add_column :oauth_applications, :owner_type, :string, null: true
|
||||
change_table(:oauth_applications, bulk: true) do |t|
|
||||
t.column :owner_id, :integer, null: true
|
||||
t.column :owner_type, :string, null: true
|
||||
end
|
||||
add_index :oauth_applications, [:owner_id, :owner_type]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue