BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
add9adbb
Commit
add9adbb
authored
Mar 21, 2017
by
Douwe Maan
Committed by
DJ Mountney
Mar 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'fix-routes-index-migration' into 'master'
Fix routes index migration See merge request !10121
parent
68873d74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
20170317203554_index_routes_path_for_like.rb
db/migrate/20170317203554_index_routes_path_for_like.rb
+2
-2
No files found.
db/migrate/20170317203554_index_routes_path_for_like.rb
View file @
add9adbb
...
@@ -14,7 +14,7 @@ class IndexRoutesPathForLike < ActiveRecord::Migration
...
@@ -14,7 +14,7 @@ class IndexRoutesPathForLike < ActiveRecord::Migration
def
up
def
up
return
unless
Gitlab
::
Database
.
postgresql?
return
unless
Gitlab
::
Database
.
postgresql?
unless
index_exists?
(
:routes
,
name:
INDEX_NAME
)
unless
index_exists?
(
:routes
,
:path
,
name:
INDEX_NAME
)
execute
(
"CREATE INDEX CONCURRENTLY
#{
INDEX_NAME
}
ON routes (path varchar_pattern_ops);"
)
execute
(
"CREATE INDEX CONCURRENTLY
#{
INDEX_NAME
}
ON routes (path varchar_pattern_ops);"
)
end
end
end
end
...
@@ -22,7 +22,7 @@ class IndexRoutesPathForLike < ActiveRecord::Migration
...
@@ -22,7 +22,7 @@ class IndexRoutesPathForLike < ActiveRecord::Migration
def
down
def
down
return
unless
Gitlab
::
Database
.
postgresql?
return
unless
Gitlab
::
Database
.
postgresql?
if
index_exists?
(
:routes
,
name:
INDEX_NAME
)
if
index_exists?
(
:routes
,
:path
,
name:
INDEX_NAME
)
execute
(
"DROP INDEX CONCURRENTLY
#{
INDEX_NAME
}
;"
)
execute
(
"DROP INDEX CONCURRENTLY
#{
INDEX_NAME
}
;"
)
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