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
0cc58b13
Commit
0cc58b13
authored
Jun 23, 2020
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the naming on the indexes
parent
c30983d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
db/migrate/20200616145031_add_author_id_index_to_audit_events.rb
...ate/20200616145031_add_author_id_index_to_audit_events.rb
+2
-2
db/structure.sql
db/structure.sql
+2
-2
No files found.
db/migrate/20200616145031_add_author_id_index_to_audit_events.rb
View file @
0cc58b13
...
...
@@ -7,8 +7,8 @@ class AddAuthorIdIndexToAuditEvents < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
INDEX_NAME
=
'index_
on_entity_id_and_entity_type_and_id_desc_and_author_id'
.
freeze
OLD_INDEX_NAME
=
'index_audit_events_on_entity_id_and_entity_type_and_id_desc'
.
freeze
INDEX_NAME
=
'index_
audit_events_on_entity_id_entity_type_id_desc_author_id'
OLD_INDEX_NAME
=
'index_audit_events_on_entity_id_and_entity_type_and_id_desc'
def
up
add_concurrent_index
(
:audit_events
,
[
:entity_id
,
:entity_type
,
:id
,
:author_id
],
order:
{
id: :desc
},
name:
INDEX_NAME
)
...
...
db/structure.sql
View file @
0cc58b13
...
...
@@ -9419,6 +9419,8 @@ CREATE INDEX index_approvers_on_target_id_and_target_type ON public.approvers US
CREATE
INDEX
index_approvers_on_user_id
ON
public
.
approvers
USING
btree
(
user_id
);
CREATE
INDEX
index_audit_events_on_entity_id_entity_type_id_desc_author_id
ON
public
.
audit_events
USING
btree
(
entity_id
,
entity_type
,
id
DESC
,
author_id
);
CREATE
INDEX
index_audit_events_on_ruby_object_in_details
ON
public
.
audit_events
USING
btree
(
id
)
WHERE
(
details
~~
'%ruby/object%'
::
text
);
CREATE
INDEX
index_award_emoji_on_awardable_type_and_awardable_id
ON
public
.
award_emoji
USING
btree
(
awardable_type
,
awardable_id
);
...
...
@@ -10467,8 +10469,6 @@ CREATE UNIQUE INDEX index_oauth_applications_on_uid ON public.oauth_applications
CREATE
INDEX
index_oauth_openid_requests_on_access_grant_id
ON
public
.
oauth_openid_requests
USING
btree
(
access_grant_id
);
CREATE
INDEX
index_on_author_id_and_entity_id_and_entity_type_and_id_desc
ON
public
.
audit_events
USING
btree
(
entity_id
,
entity_type
,
id
DESC
,
author_id
);
CREATE
UNIQUE
INDEX
index_on_deploy_keys_id_and_type_and_public
ON
public
.
keys
USING
btree
(
id
,
type
)
WHERE
(
public
=
true
);
CREATE
INDEX
index_on_id_partial_with_legacy_storage
ON
public
.
projects
USING
btree
(
id
)
WHERE
((
storage_version
<
2
)
OR
(
storage_version
IS
NULL
));
...
...
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