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
30678dc1
Commit
30678dc1
authored
Jan 09, 2020
by
Giorgenes Gelatti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds sorting indexes to package
parent
5f069488
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletion
+41
-1
db/migrate/20200109030418_add_sorting_index_to_packages.rb
db/migrate/20200109030418_add_sorting_index_to_packages.rb
+21
-0
db/migrate/20200109233938_remove_project_id_index_from_packages.rb
...e/20200109233938_remove_project_id_index_from_packages.rb
+17
-0
db/schema.rb
db/schema.rb
+3
-1
No files found.
db/migrate/20200109030418_add_sorting_index_to_packages.rb
0 → 100644
View file @
30678dc1
# frozen_string_literal: true
class
AddSortingIndexToPackages
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:packages_packages
,
[
:project_id
,
:created_at
]
add_concurrent_index
:packages_packages
,
[
:project_id
,
:version
]
add_concurrent_index
:packages_packages
,
[
:project_id
,
:package_type
]
end
def
down
remove_concurrent_index
:packages_packages
,
[
:project_id
,
:created_at
]
remove_concurrent_index
:packages_packages
,
[
:project_id
,
:version
]
remove_concurrent_index
:packages_packages
,
[
:project_id
,
:package_type
]
end
end
db/migrate/20200109233938_remove_project_id_index_from_packages.rb
0 → 100644
View file @
30678dc1
# frozen_string_literal: true
class
RemoveProjectIdIndexFromPackages
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
remove_concurrent_index
:packages_packages
,
[
:project_id
]
end
def
down
add_concurrent_index
:packages_packages
,
[
:project_id
]
end
end
db/schema.rb
View file @
30678dc1
...
...
@@ -2977,8 +2977,10 @@ ActiveRecord::Schema.define(version: 2020_01_30_161817) do
t
.
string
"version"
t
.
integer
"package_type"
,
limit:
2
,
null:
false
t
.
index
[
"name"
],
name:
"index_packages_packages_on_name_trigram"
,
opclass: :gin_trgm_ops
,
using: :gin
t
.
index
[
"project_id"
,
"created_at"
],
name:
"index_packages_packages_on_project_id_and_created_at"
t
.
index
[
"project_id"
,
"name"
,
"version"
,
"package_type"
],
name:
"idx_packages_packages_on_project_id_name_version_package_type"
t
.
index
[
"project_id"
],
name:
"index_packages_packages_on_project_id"
t
.
index
[
"project_id"
,
"package_type"
],
name:
"index_packages_packages_on_project_id_and_package_type"
t
.
index
[
"project_id"
,
"version"
],
name:
"index_packages_packages_on_project_id_and_version"
end
create_table
"packages_tags"
,
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