Fix Rails/BulkChangeTable
cop (#26890)
This commit is contained in:
parent
0c4e7c06dc
commit
c501d626e8
31 changed files with 208 additions and 107 deletions
|
@ -2,10 +2,12 @@
|
|||
|
||||
class AddActivityPubToAccounts < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
add_column :accounts, :inbox_url, :string, null: false, default: ''
|
||||
add_column :accounts, :outbox_url, :string, null: false, default: ''
|
||||
add_column :accounts, :shared_inbox_url, :string, null: false, default: ''
|
||||
add_column :accounts, :followers_url, :string, null: false, default: ''
|
||||
add_column :accounts, :protocol, :integer, null: false, default: 0
|
||||
change_table(:accounts, bulk: true) do |t|
|
||||
t.column :inbox_url, :string, null: false, default: ''
|
||||
t.column :outbox_url, :string, null: false, default: ''
|
||||
t.column :shared_inbox_url, :string, null: false, default: ''
|
||||
t.column :followers_url, :string, null: false, default: ''
|
||||
t.column :protocol, :integer, null: false, default: 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue