Commit b1803a2e authored by Andreas Brandl's avatar Andreas Brandl

Allow change_column_null in lock retries helper

parent 232d1336
......@@ -7,7 +7,6 @@ class RemoveNotNullConstraintOnTypeFromAuditEvents < ActiveRecord::Migration[6.0
disable_ddl_transaction!
# rubocop:disable Migration/WithLockRetriesDisallowedMethod
# To avoid deadlock on audit_event and audit_event_part... since there is a trigger to insert record from audit_events
# to audit_events_part..., we need to ensure each ALTER TABLE command run in its own transaction.
def up
......@@ -19,7 +18,6 @@ class RemoveNotNullConstraintOnTypeFromAuditEvents < ActiveRecord::Migration[6.0
change_column_null :audit_events, :type, true
end
end
# rubocop:enable Migration/WithLockRetriesDisallowedMethod
def down
# no-op -- null values might be added after this constraint is removed.
......
......@@ -18,6 +18,7 @@ module RuboCop
remove_column
execute
change_column_default
change_column_null
remove_foreign_key_if_exists
remove_foreign_key_without_error
table_exists?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment