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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
a8812aaa
Commit
a8812aaa
authored
Mar 15, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix migrations not specifying DOWNTIME
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
67de3543
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
db/migrate/20160615142710_add_index_on_requested_at_to_members.rb
...te/20160615142710_add_index_on_requested_at_to_members.rb
+5
-1
db/migrate/20160620115026_add_index_on_runners_locked.rb
db/migrate/20160620115026_add_index_on_runners_locked.rb
+5
-1
db/migrate/20160715134306_add_index_for_pipeline_user_id.rb
db/migrate/20160715134306_add_index_for_pipeline_user_id.rb
+7
-1
No files found.
db/migrate/20160615142710_add_index_on_requested_at_to_members.rb
View file @
a8812aaa
...
@@ -5,7 +5,11 @@ class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration
...
@@ -5,7 +5,11 @@ class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration
disable_ddl_transaction!
disable_ddl_transaction!
def
change
def
up
add_concurrent_index
:members
,
:requested_at
add_concurrent_index
:members
,
:requested_at
end
end
def
down
remove_index
:members
,
:requested_at
if
index_exists?
:members
,
:requested_at
end
end
end
db/migrate/20160620115026_add_index_on_runners_locked.rb
View file @
a8812aaa
...
@@ -8,7 +8,11 @@ class AddIndexOnRunnersLocked < ActiveRecord::Migration
...
@@ -8,7 +8,11 @@ class AddIndexOnRunnersLocked < ActiveRecord::Migration
disable_ddl_transaction!
disable_ddl_transaction!
def
change
def
up
add_concurrent_index
:ci_runners
,
:locked
add_concurrent_index
:ci_runners
,
:locked
end
end
def
down
remove_index
:ci_runners
,
:locked
if
index_exists?
:ci_runners
,
:locked
end
end
end
db/migrate/20160715134306_add_index_for_pipeline_user_id.rb
View file @
a8812aaa
class
AddIndexForPipelineUserId
<
ActiveRecord
::
Migration
class
AddIndexForPipelineUserId
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
disable_ddl_transaction!
def
change
def
up
add_concurrent_index
:ci_commits
,
:user_id
add_concurrent_index
:ci_commits
,
:user_id
end
end
def
down
remove_index
:ci_commits
,
:user_id
if
index_exists?
:ci_commits
,
:user_id
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