Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b1803a2e
Commit
b1803a2e
authored
Aug 17, 2020
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow change_column_null in lock retries helper
parent
232d1336
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
db/migrate/20200811055018_remove_not_null_constraint_on_type_from_audit_events.rb
...8_remove_not_null_constraint_on_type_from_audit_events.rb
+0
-2
rubocop/cop/migration/with_lock_retries_disallowed_method.rb
rubocop/cop/migration/with_lock_retries_disallowed_method.rb
+1
-0
No files found.
db/migrate/20200811055018_remove_not_null_constraint_on_type_from_audit_events.rb
View file @
b1803a2e
...
...
@@ -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.
...
...
rubocop/cop/migration/with_lock_retries_disallowed_method.rb
View file @
b1803a2e
...
...
@@ -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?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment