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
65fc61aa
Commit
65fc61aa
authored
Feb 07, 2017
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds indexes to relevant mirror fields
parent
7ffe6cab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
db/migrate/20170207150212_add_indexes_to_mirrors.rb
db/migrate/20170207150212_add_indexes_to_mirrors.rb
+12
-0
db/schema.rb
db/schema.rb
+3
-1
No files found.
db/migrate/20170207150212_add_indexes_to_mirrors.rb
0 → 100644
View file @
65fc61aa
class
AddIndexesToMirrors
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
change
add_concurrent_index
:projects
,
[
:sync_time
]
add_concurrent_index
:remote_mirrors
,
[
:sync_time
]
end
end
db/schema.rb
View file @
65fc61aa
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2017020
4181513
)
do
ActiveRecord
::
Schema
.
define
(
version:
2017020
7150212
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -1128,6 +1128,7 @@ ActiveRecord::Schema.define(version: 20170204181513) do
add_index
"projects"
,
[
"pending_delete"
],
name:
"index_projects_on_pending_delete"
,
using: :btree
add_index
"projects"
,
[
"runners_token"
],
name:
"index_projects_on_runners_token"
,
using: :btree
add_index
"projects"
,
[
"star_count"
],
name:
"index_projects_on_star_count"
,
using: :btree
add_index
"projects"
,
[
"sync_time"
],
name:
"index_projects_on_sync_time"
,
using: :btree
add_index
"projects"
,
[
"visibility_level"
],
name:
"index_projects_on_visibility_level"
,
using: :btree
create_table
"protected_branch_merge_access_levels"
,
force: :cascade
do
|
t
|
...
...
@@ -1210,6 +1211,7 @@ ActiveRecord::Schema.define(version: 20170204181513) do
end
add_index
"remote_mirrors"
,
[
"project_id"
],
name:
"index_remote_mirrors_on_project_id"
,
using: :btree
add_index
"remote_mirrors"
,
[
"sync_time"
],
name:
"index_remote_mirrors_on_sync_time"
,
using: :btree
create_table
"routes"
,
force: :cascade
do
|
t
|
t
.
integer
"source_id"
,
null:
false
...
...
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