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
fc3437db
Commit
fc3437db
authored
Nov 12, 2020
by
Lee Tickett
Committed by
Stan Hu
Nov 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Guard against existence of project_features.requirement_access_level
parent
9ec452e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
changelogs/unreleased/add_existing_column_check_to_46532.yml
changelogs/unreleased/add_existing_column_check_to_46532.yml
+5
-0
db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb
...2151_add_requirements_access_level_to_project_features.rb
+4
-4
No files found.
changelogs/unreleased/add_existing_column_check_to_46532.yml
0 → 100644
View file @
fc3437db
---
title
:
Guard against existence of project_features.requirement_access_level in migration
merge_request
:
47458
author
:
Lee Tickett
type
:
other
db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb
View file @
fc3437db
...
@@ -6,14 +6,14 @@ class AddRequirementsAccessLevelToProjectFeatures < ActiveRecord::Migration[6.0]
...
@@ -6,14 +6,14 @@ class AddRequirementsAccessLevelToProjectFeatures < ActiveRecord::Migration[6.0]
DOWNTIME
=
false
DOWNTIME
=
false
def
up
def
up
with_lock_retries
do
unless
column_exists?
(
:project_features
,
:requirements_access_level
)
add_column
:project_features
,
:requirements_access_level
,
:integer
,
default:
20
,
null:
false
with_lock_retries
{
add_column
:project_features
,
:requirements_access_level
,
:integer
,
default:
20
,
null:
false
}
end
end
end
end
def
down
def
down
with_lock_retries
do
if
column_exists?
(
:project_features
,
:requirements_access_level
)
remove_column
:project_features
,
:requirements_access_level
,
:integer
with_lock_retries
{
remove_column
:project_features
,
:requirements_access_level
}
end
end
end
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