Fix migrations failing due to strong-migrations update (#13680)
parent
6748a5acb1
commit
5892e8175a
@ -1,5 +1,5 @@
|
|||||||
class AddInviteIdToUsers < ActiveRecord::Migration[5.1]
|
class AddInviteIdToUsers < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
add_reference :users, :invite, null: true, default: nil, foreign_key: { on_delete: :nullify }, index: false
|
safety_assured { add_reference :users, :invite, null: true, default: nil, foreign_key: { on_delete: :nullify }, index: false }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
class AddAssignedAccountIdToReports < ActiveRecord::Migration[5.1]
|
class AddAssignedAccountIdToReports < ActiveRecord::Migration[5.1]
|
||||||
def change
|
def change
|
||||||
add_reference :reports, :assigned_account, null: true, default: nil, foreign_key: { on_delete: :nullify, to_table: :accounts }, index: false
|
safety_assured { add_reference :reports, :assigned_account, null: true, default: nil, foreign_key: { on_delete: :nullify, to_table: :accounts }, index: false }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
class AddAccessTokenIdToWebPushSubscriptions < ActiveRecord::Migration[5.2]
|
class AddAccessTokenIdToWebPushSubscriptions < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
|
safety_assured do
|
||||||
add_reference :web_push_subscriptions, :access_token, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :oauth_access_tokens }, index: false
|
add_reference :web_push_subscriptions, :access_token, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :oauth_access_tokens }, index: false
|
||||||
add_reference :web_push_subscriptions, :user, null: true, default: nil, foreign_key: { on_delete: :cascade }, index: false
|
add_reference :web_push_subscriptions, :user, null: true, default: nil, foreign_key: { on_delete: :cascade }, index: false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
class AddParentIdToEmailDomainBlocks < ActiveRecord::Migration[5.2]
|
class AddParentIdToEmailDomainBlocks < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
add_reference :email_domain_blocks, :parent, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :email_domain_blocks }, index: false
|
safety_assured { add_reference :email_domain_blocks, :parent, null: true, default: nil, foreign_key: { on_delete: :cascade, to_table: :email_domain_blocks }, index: false }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in new issue