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
2220ceea
Commit
2220ceea
authored
Apr 08, 2020
by
mbergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add migration for the `Route.path` trigram index
parent
4de027be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
db/migrate/20200408133211_add_index_on_route_path_trigram.rb
db/migrate/20200408133211_add_index_on_route_path_trigram.rb
+18
-0
db/structure.sql
db/structure.sql
+3
-0
No files found.
db/migrate/20200408133211_add_index_on_route_path_trigram.rb
0 → 100644
View file @
2220ceea
# frozen_string_literal: true
class
AddIndexOnRoutePathTrigram
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_routes_on_path_trigram'
disable_ddl_transaction!
def
up
add_concurrent_index
:routes
,
:path
,
name:
INDEX_NAME
,
using: :gin
,
opclass:
{
path: :gin_trgm_ops
}
end
def
down
remove_concurrent_index_by_name
(
:routes
,
INDEX_NAME
)
end
end
db/structure.sql
View file @
2220ceea
...
...
@@ -10117,6 +10117,8 @@ CREATE UNIQUE INDEX index_routes_on_path ON public.routes USING btree (path);
CREATE
INDEX
index_routes_on_path_text_pattern_ops
ON
public
.
routes
USING
btree
(
path
varchar_pattern_ops
);
CREATE
INDEX
index_routes_on_path_trigram
ON
public
.
routes
USING
gin
(
path
public
.
gin_trgm_ops
);
CREATE
UNIQUE
INDEX
index_routes_on_source_type_and_source_id
ON
public
.
routes
USING
btree
(
source_type
,
source_id
);
CREATE
INDEX
index_saml_providers_on_group_id
ON
public
.
saml_providers
USING
btree
(
group_id
);
...
...
@@ -13150,6 +13152,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200407094005
20200407094923
20200408110856
20200408133211
20200408153842
20200408175424
20200409211607
...
...
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