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
d2f4e8f9
Commit
d2f4e8f9
authored
Jul 08, 2016
by
Paco Guzman
Committed by
James Edwards-Jones
Jan 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid adding index if already exists
parent
797fe0a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
db/migrate/20160301174731_add_fingerprint_index.rb
db/migrate/20160301174731_add_fingerprint_index.rb
+2
-1
No files found.
db/migrate/20160301174731_add_fingerprint_index.rb
View file @
d2f4e8f9
...
@@ -4,6 +4,7 @@ class AddFingerprintIndex < ActiveRecord::Migration
...
@@ -4,6 +4,7 @@ class AddFingerprintIndex < ActiveRecord::Migration
DOWNTIME
=
false
DOWNTIME
=
false
# https://gitlab.com/gitlab-org/gitlab-ee/issues/764
def
change
def
change
args
=
[
:keys
,
:fingerprint
]
args
=
[
:keys
,
:fingerprint
]
...
@@ -11,6 +12,6 @@ class AddFingerprintIndex < ActiveRecord::Migration
...
@@ -11,6 +12,6 @@ class AddFingerprintIndex < ActiveRecord::Migration
args
<<
{
algorithm: :concurrently
}
args
<<
{
algorithm: :concurrently
}
end
end
add_index
(
*
args
)
add_index
(
*
args
)
unless
index_exists?
(
:keys
,
:fingerprint
)
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