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
559e41a8
Commit
559e41a8
authored
Sep 05, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing indexes to geo_event_log table
parent
e5e3f88e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
db/migrate/20170905202320_add_missing_indexes_to_geo_event_log.rb
...te/20170905202320_add_missing_indexes_to_geo_event_log.rb
+19
-0
db/schema.rb
db/schema.rb
+4
-1
No files found.
db/migrate/20170905202320_add_missing_indexes_to_geo_event_log.rb
0 → 100644
View file @
559e41a8
class
AddMissingIndexesToGeoEventLog
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:geo_event_log
,
:repositories_changed_event_id
add_concurrent_index
:geo_event_log
,
:repository_deleted_event_id
add_concurrent_index
:geo_event_log
,
:repository_renamed_event_id
end
def
down
remove_concurrent_index
:geo_event_log
,
:repositories_changed_event_id
if
index_exists?
:geo_event_log
,
:repositories_changed_event_id
remove_concurrent_index
:geo_event_log
,
:repository_deleted_event_id
if
index_exists?
:geo_event_log
,
:repository_deleted_event_id
remove_concurrent_index
:geo_event_log
,
:repository_renamed_event_id
if
index_exists?
:geo_event_log
,
:repository_renamed_event_id
end
end
db/schema.rb
View file @
559e41a8
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20170
824162758
)
do
ActiveRecord
::
Schema
.
define
(
version:
20170
905202320
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -671,6 +671,9 @@ ActiveRecord::Schema.define(version: 20170824162758) do
t
.
integer
"repositories_changed_event_id"
,
limit:
8
end
add_index
"geo_event_log"
,
[
"repositories_changed_event_id"
],
name:
"index_geo_event_log_on_repositories_changed_event_id"
,
using: :btree
add_index
"geo_event_log"
,
[
"repository_deleted_event_id"
],
name:
"index_geo_event_log_on_repository_deleted_event_id"
,
using: :btree
add_index
"geo_event_log"
,
[
"repository_renamed_event_id"
],
name:
"index_geo_event_log_on_repository_renamed_event_id"
,
using: :btree
add_index
"geo_event_log"
,
[
"repository_updated_event_id"
],
name:
"index_geo_event_log_on_repository_updated_event_id"
,
using: :btree
create_table
"geo_node_namespace_links"
,
force: :cascade
do
|
t
|
...
...
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