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
Léo-Paul Géneau
gitlab-ce
Commits
e79784b7
Commit
e79784b7
authored
Feb 21, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create index on id instead of stage_id in migration
parent
2f3f9a6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb
...te/20180212101828_add_tmp_partial_null_index_to_builds.rb
+3
-3
db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb
...180212102028_remove_tmp_partial_null_index_from_builds.rb
+3
-3
No files found.
db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb
View file @
e79784b7
...
@@ -4,11 +4,11 @@ class AddTmpPartialNullIndexToBuilds < ActiveRecord::Migration
...
@@ -4,11 +4,11 @@ class AddTmpPartialNullIndexToBuilds < ActiveRecord::Migration
disable_ddl_transaction!
disable_ddl_transaction!
def
up
def
up
add_concurrent_index
(
:ci_builds
,
:
stage_
id
,
where:
'stage_id IS NULL'
,
add_concurrent_index
(
:ci_builds
,
:id
,
where:
'stage_id IS NULL'
,
name:
'tmp_stage
_id_partial_null_index'
)
name:
'tmp
_id_partial_null_index'
)
end
end
def
down
def
down
remove_concurrent_index_by_name
(
:ci_builds
,
'tmp_
stage_
id_partial_null_index'
)
remove_concurrent_index_by_name
(
:ci_builds
,
'tmp_id_partial_null_index'
)
end
end
end
end
db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb
View file @
e79784b7
...
@@ -4,11 +4,11 @@ class RemoveTmpPartialNullIndexFromBuilds < ActiveRecord::Migration
...
@@ -4,11 +4,11 @@ class RemoveTmpPartialNullIndexFromBuilds < ActiveRecord::Migration
disable_ddl_transaction!
disable_ddl_transaction!
def
up
def
up
remove_concurrent_index_by_name
(
:ci_builds
,
'tmp_
stage_
id_partial_null_index'
)
remove_concurrent_index_by_name
(
:ci_builds
,
'tmp_id_partial_null_index'
)
end
end
def
down
def
down
add_concurrent_index
(
:ci_builds
,
:
stage_
id
,
where:
'stage_id IS NULL'
,
add_concurrent_index
(
:ci_builds
,
:id
,
where:
'stage_id IS NULL'
,
name:
'tmp_stage
_id_partial_null_index'
)
name:
'tmp
_id_partial_null_index'
)
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