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
0ccb04f4
Commit
0ccb04f4
authored
Jul 24, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use with_lock_retries in migration
parent
2f7125e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
2 deletions
+13
-2
db/migrate/20200721034536_add_issue_type_to_issues.rb
db/migrate/20200721034536_add_issue_type_to_issues.rb
+10
-2
db/schema_migrations/20200721034536
db/schema_migrations/20200721034536
+1
-0
db/schema_migrations/20200721043502
db/schema_migrations/20200721043502
+1
-0
db/structure.sql
db/structure.sql
+1
-0
No files found.
db/migrate/20200721034536_add_issue_type_to_issues.rb
View file @
0ccb04f4
# frozen_string_literal: true
class
AddIssueTypeToIssues
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
change
def
up
with_lock_retries
do
# Set default to issue type
add_column
:issues
,
:issue_type
,
:integer
,
limit:
2
,
default:
0
add_column
:issues
,
:issue_type
,
:integer
,
limit:
2
,
default:
0
,
null:
false
end
end
def
down
with_lock_retries
do
remove_column
:issues
,
:issue_type
end
end
end
db/schema_migrations/20200721034536
0 → 100644
View file @
0ccb04f4
9d30ae6ea32db6cbc5871e214a9c2bf8f1a37fbb586f5e39f6bc2ab58768607b
\ No newline at end of file
db/schema_migrations/20200721043502
0 → 100644
View file @
0ccb04f4
13731676720dd93887dc55374c9052f1087a2e817eb347fd63a19d9398899d75
\ No newline at end of file
db/structure.sql
View file @
0ccb04f4
...
...
@@ -12529,6 +12529,7 @@ CREATE TABLE public.issues (
sprint_id
bigint
,
issue_type
smallint
DEFAULT
0
,
CONSTRAINT
check_fba63f706d
CHECK
((
lock_version
IS
NOT
NULL
))
issue_type
smallint
DEFAULT
0
NOT
NULL
);
CREATE
SEQUENCE
public
.
issues_id_seq
...
...
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