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
5aae35ea
Commit
5aae35ea
authored
Jun 22, 2020
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused indexes on file_store columns
We already have a default value for the file_store columns.
parent
89148f9d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
6 deletions
+57
-6
db/migrate/20200622235737_remove_index_ci_job_artifacts_file_store_is_null.rb
...35737_remove_index_ci_job_artifacts_file_store_is_null.rb
+18
-0
db/migrate/20200623000148_remove_index_lfs_objects_file_store_is_null.rb
...0623000148_remove_index_lfs_objects_file_store_is_null.rb
+18
-0
db/migrate/20200623000320_remove_index_uploads_store_is_null.rb
...rate/20200623000320_remove_index_uploads_store_is_null.rb
+18
-0
db/structure.sql
db/structure.sql
+3
-6
No files found.
db/migrate/20200622235737_remove_index_ci_job_artifacts_file_store_is_null.rb
0 → 100644
View file @
5aae35ea
# frozen_string_literal: true
class
RemoveIndexCiJobArtifactsFileStoreIsNull
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_ci_job_artifacts_file_store_is_null'
disable_ddl_transaction!
def
up
remove_concurrent_index_by_name
(
:ci_job_artifacts
,
INDEX_NAME
)
end
def
down
add_concurrent_index
(
:ci_job_artifacts
,
:id
,
where:
"file_store IS NULL"
,
name:
INDEX_NAME
)
end
end
db/migrate/20200623000148_remove_index_lfs_objects_file_store_is_null.rb
0 → 100644
View file @
5aae35ea
# frozen_string_literal: true
class
RemoveIndexLfsObjectsFileStoreIsNull
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_lfs_objects_file_store_is_null'
disable_ddl_transaction!
def
up
remove_concurrent_index_by_name
(
:lfs_objects
,
INDEX_NAME
)
end
def
down
add_concurrent_index
(
:lfs_objects
,
:id
,
where:
"file_store IS NULL"
,
name:
INDEX_NAME
)
end
end
db/migrate/20200623000320_remove_index_uploads_store_is_null.rb
0 → 100644
View file @
5aae35ea
# frozen_string_literal: true
class
RemoveIndexUploadsStoreIsNull
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_uploads_store_is_null'
disable_ddl_transaction!
def
up
remove_concurrent_index_by_name
(
:uploads
,
INDEX_NAME
)
end
def
down
add_concurrent_index
(
:uploads
,
:id
,
where:
"store IS NULL"
,
name:
INDEX_NAME
)
end
end
db/structure.sql
View file @
5aae35ea
...
@@ -9559,8 +9559,6 @@ CREATE UNIQUE INDEX index_ci_group_variables_on_group_id_and_key ON public.ci_gr
...
@@ -9559,8 +9559,6 @@ CREATE UNIQUE INDEX index_ci_group_variables_on_group_id_and_key ON public.ci_gr
CREATE
UNIQUE
INDEX
index_ci_instance_variables_on_key
ON
public
.
ci_instance_variables
USING
btree
(
key
);
CREATE
UNIQUE
INDEX
index_ci_instance_variables_on_key
ON
public
.
ci_instance_variables
USING
btree
(
key
);
CREATE
INDEX
index_ci_job_artifacts_file_store_is_null
ON
public
.
ci_job_artifacts
USING
btree
(
id
)
WHERE
(
file_store
IS
NULL
);
CREATE
INDEX
index_ci_job_artifacts_for_terraform_reports
ON
public
.
ci_job_artifacts
USING
btree
(
project_id
,
id
)
WHERE
(
file_type
=
18
);
CREATE
INDEX
index_ci_job_artifacts_for_terraform_reports
ON
public
.
ci_job_artifacts
USING
btree
(
project_id
,
id
)
WHERE
(
file_type
=
18
);
CREATE
INDEX
index_ci_job_artifacts_on_expire_at_and_job_id
ON
public
.
ci_job_artifacts
USING
btree
(
expire_at
,
job_id
);
CREATE
INDEX
index_ci_job_artifacts_on_expire_at_and_job_id
ON
public
.
ci_job_artifacts
USING
btree
(
expire_at
,
job_id
);
...
@@ -10225,8 +10223,6 @@ CREATE UNIQUE INDEX index_lfs_file_locks_on_project_id_and_path ON public.lfs_fi
...
@@ -10225,8 +10223,6 @@ CREATE UNIQUE INDEX index_lfs_file_locks_on_project_id_and_path ON public.lfs_fi
CREATE
INDEX
index_lfs_file_locks_on_user_id
ON
public
.
lfs_file_locks
USING
btree
(
user_id
);
CREATE
INDEX
index_lfs_file_locks_on_user_id
ON
public
.
lfs_file_locks
USING
btree
(
user_id
);
CREATE
INDEX
index_lfs_objects_file_store_is_null
ON
public
.
lfs_objects
USING
btree
(
id
)
WHERE
(
file_store
IS
NULL
);
CREATE
INDEX
index_lfs_objects_on_file_store
ON
public
.
lfs_objects
USING
btree
(
file_store
);
CREATE
INDEX
index_lfs_objects_on_file_store
ON
public
.
lfs_objects
USING
btree
(
file_store
);
CREATE
UNIQUE
INDEX
index_lfs_objects_on_oid
ON
public
.
lfs_objects
USING
btree
(
oid
);
CREATE
UNIQUE
INDEX
index_lfs_objects_on_oid
ON
public
.
lfs_objects
USING
btree
(
oid
);
...
@@ -11093,8 +11089,6 @@ CREATE INDEX index_uploads_on_store ON public.uploads USING btree (store);
...
@@ -11093,8 +11089,6 @@ CREATE INDEX index_uploads_on_store ON public.uploads USING btree (store);
CREATE
INDEX
index_uploads_on_uploader_and_path
ON
public
.
uploads
USING
btree
(
uploader
,
path
);
CREATE
INDEX
index_uploads_on_uploader_and_path
ON
public
.
uploads
USING
btree
(
uploader
,
path
);
CREATE
INDEX
index_uploads_store_is_null
ON
public
.
uploads
USING
btree
(
id
)
WHERE
(
store
IS
NULL
);
CREATE
INDEX
index_user_agent_details_on_subject_id_and_subject_type
ON
public
.
user_agent_details
USING
btree
(
subject_id
,
subject_type
);
CREATE
INDEX
index_user_agent_details_on_subject_id_and_subject_type
ON
public
.
user_agent_details
USING
btree
(
subject_id
,
subject_type
);
CREATE
INDEX
index_user_callouts_on_user_id
ON
public
.
user_callouts
USING
btree
(
user_id
);
CREATE
INDEX
index_user_callouts_on_user_id
ON
public
.
user_callouts
USING
btree
(
user_id
);
...
@@ -14120,5 +14114,8 @@ COPY "schema_migrations" (version) FROM STDIN;
...
@@ -14120,5 +14114,8 @@ COPY "schema_migrations" (version) FROM STDIN;
20200618134223
20200618134223
20200618134723
20200618134723
20200622103836
20200622103836
20200622235737
20200623000148
20200623000320
\
.
\
.
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