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
c4bbd3e0
Commit
c4bbd3e0
authored
Aug 26, 2021
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use with_lock_retries for migration
parent
40bdd89b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
db/migrate/20210819162047_add_columns_to_namespace_settings.rb
...grate/20210819162047_add_columns_to_namespace_settings.rb
+16
-3
No files found.
db/migrate/20210819162047_add_columns_to_namespace_settings.rb
View file @
c4bbd3e0
# frozen_string_literal: true
class
AddColumnsToNamespaceSettings
<
ActiveRecord
::
Migration
[
6.1
]
def
change
add_column
:namespace_settings
,
:setup_for_company
,
:boolean
add_column
:namespace_settings
,
:jobs_to_be_done
,
:smallint
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
def
up
with_lock_retries
do
add_column
:namespace_settings
,
:setup_for_company
,
:boolean
add_column
:namespace_settings
,
:jobs_to_be_done
,
:smallint
end
end
def
down
with_lock_retries
do
remove_column
:namespace_settings
,
:setup_for_company
remove_column
:namespace_settings
,
:jobs_to_be_done
end
end
end
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