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
c24c2e8a
Commit
c24c2e8a
authored
Apr 16, 2020
by
Drew Blessing
Committed by
Drew Blessing
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable transactions for user foreign key migrations
parent
6c881698
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
0 deletions
+15
-0
db/migrate/20200407171133_add_protected_tag_create_access_levels_user_id_foreign_key.rb
...protected_tag_create_access_levels_user_id_foreign_key.rb
+3
-0
db/migrate/20200408154331_add_protected_branch_merge_access_levels_user_id_foreign_key.rb
...otected_branch_merge_access_levels_user_id_foreign_key.rb
+3
-0
db/migrate/20200408154411_add_path_locks_user_id_foreign_key.rb
...rate/20200408154411_add_path_locks_user_id_foreign_key.rb
+3
-0
db/migrate/20200408154455_add_protected_branch_push_access_levels_user_id_foreign_key.rb
...rotected_branch_push_access_levels_user_id_foreign_key.rb
+3
-0
db/migrate/20200408154604_add_u2f_registrations_user_id_foreign_key.rb
...200408154604_add_u2f_registrations_user_id_foreign_key.rb
+3
-0
No files found.
db/migrate/20200407171133_add_protected_tag_create_access_levels_user_id_foreign_key.rb
View file @
c24c2e8a
# frozen_string_literal: true
# frozen_string_literal: true
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/WithLockRetriesWithoutDdlTransaction
class
AddProtectedTagCreateAccessLevelsUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
class
AddProtectedTagCreateAccessLevelsUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
DOWNTIME
=
false
CONSTRAINT_NAME
=
'fk_protected_tag_create_access_levels_user_id'
CONSTRAINT_NAME
=
'fk_protected_tag_create_access_levels_user_id'
disable_ddl_transaction!
def
up
def
up
with_lock_retries
do
with_lock_retries
do
add_foreign_key
(
:protected_tag_create_access_levels
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
add_foreign_key
(
:protected_tag_create_access_levels
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
...
...
db/migrate/20200408154331_add_protected_branch_merge_access_levels_user_id_foreign_key.rb
View file @
c24c2e8a
# frozen_string_literal: true
# frozen_string_literal: true
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/WithLockRetriesWithoutDdlTransaction
class
AddProtectedBranchMergeAccessLevelsUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
class
AddProtectedBranchMergeAccessLevelsUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
DOWNTIME
=
false
CONSTRAINT_NAME
=
'fk_protected_branch_merge_access_levels_user_id'
CONSTRAINT_NAME
=
'fk_protected_branch_merge_access_levels_user_id'
disable_ddl_transaction!
def
up
def
up
with_lock_retries
do
with_lock_retries
do
add_foreign_key
(
:protected_branch_merge_access_levels
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
add_foreign_key
(
:protected_branch_merge_access_levels
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
...
...
db/migrate/20200408154411_add_path_locks_user_id_foreign_key.rb
View file @
c24c2e8a
# frozen_string_literal: true
# frozen_string_literal: true
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/WithLockRetriesWithoutDdlTransaction
class
AddPathLocksUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
class
AddPathLocksUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
DOWNTIME
=
false
CONSTRAINT_NAME
=
'fk_path_locks_user_id'
CONSTRAINT_NAME
=
'fk_path_locks_user_id'
disable_ddl_transaction!
def
up
def
up
with_lock_retries
do
with_lock_retries
do
add_foreign_key
(
:path_locks
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
add_foreign_key
(
:path_locks
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
...
...
db/migrate/20200408154455_add_protected_branch_push_access_levels_user_id_foreign_key.rb
View file @
c24c2e8a
# frozen_string_literal: true
# frozen_string_literal: true
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/WithLockRetriesWithoutDdlTransaction
class
AddProtectedBranchPushAccessLevelsUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
class
AddProtectedBranchPushAccessLevelsUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
DOWNTIME
=
false
CONSTRAINT_NAME
=
'fk_protected_branch_push_access_levels_user_id'
CONSTRAINT_NAME
=
'fk_protected_branch_push_access_levels_user_id'
disable_ddl_transaction!
def
up
def
up
with_lock_retries
do
with_lock_retries
do
add_foreign_key
(
:protected_branch_push_access_levels
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
add_foreign_key
(
:protected_branch_push_access_levels
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
...
...
db/migrate/20200408154604_add_u2f_registrations_user_id_foreign_key.rb
View file @
c24c2e8a
# frozen_string_literal: true
# frozen_string_literal: true
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/AddConcurrentForeignKey
# rubocop: disable Migration/WithLockRetriesWithoutDdlTransaction
class
AddU2fRegistrationsUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
class
AddU2fRegistrationsUserIdForeignKey
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
DOWNTIME
=
false
CONSTRAINT_NAME
=
'fk_u2f_registrations_user_id'
CONSTRAINT_NAME
=
'fk_u2f_registrations_user_id'
disable_ddl_transaction!
def
up
def
up
with_lock_retries
do
with_lock_retries
do
add_foreign_key
(
:u2f_registrations
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
add_foreign_key
(
:u2f_registrations
,
:users
,
on_delete: :cascade
,
validate:
false
,
name:
CONSTRAINT_NAME
)
...
...
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