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
fc89169b
Commit
fc89169b
authored
Mar 09, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix two migrations to satisfy the Migration/AddConcurrentIndex cop
parent
088172b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
db/migrate/20170207150212_add_indexes_to_mirrors.rb
db/migrate/20170207150212_add_indexes_to_mirrors.rb
+6
-1
db/migrate/20170208144550_add_index_to_mirrors_last_update_at_fields.rb
...70208144550_add_index_to_mirrors_last_update_at_fields.rb
+6
-1
No files found.
db/migrate/20170207150212_add_indexes_to_mirrors.rb
View file @
fc89169b
...
...
@@ -5,8 +5,13 @@ class AddIndexesToMirrors < ActiveRecord::Migration
disable_ddl_transaction!
def
change
def
up
add_concurrent_index
:projects
,
[
:sync_time
]
add_concurrent_index
:remote_mirrors
,
[
:sync_time
]
end
def
down
remove_index
:projects
,
[
:sync_time
]
remove_index
:remote_mirrors
,
[
:sync_time
]
end
end
db/migrate/20170208144550_add_index_to_mirrors_last_update_at_fields.rb
View file @
fc89169b
...
...
@@ -5,8 +5,13 @@ class AddIndexToMirrorsLastUpdateAtFields < ActiveRecord::Migration
disable_ddl_transaction!
def
change
def
up
add_concurrent_index
:projects
,
:mirror_last_successful_update_at
add_concurrent_index
:remote_mirrors
,
:last_successful_update_at
end
def
down
remove_index
:projects
,
:mirror_last_successful_update_at
remove_index
:remote_mirrors
,
:last_successful_update_at
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