diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-05 12:09:05 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-05 12:09:05 +0000 |
commit | a662b146aca7227bc800eed4878000d2b7c9d757 (patch) | |
tree | 8eb9906203b1fda105741b3cc1488a550ebf1962 /db | |
parent | 015890a1b77cd90e9ffeb704944d1fb63b0ce555 (diff) | |
download | gitlab-ce-a662b146aca7227bc800eed4878000d2b7c9d757.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb | 19 | ||||
-rw-r--r-- | db/migrate/20201103095752_add_issues_closed_at_index.rb | 17 | ||||
-rw-r--r-- | db/schema_migrations/20201030092151 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20201103095752 | 1 | ||||
-rw-r--r-- | db/structure.sql | 5 |
5 files changed, 42 insertions, 1 deletions
diff --git a/db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb b/db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb new file mode 100644 index 00000000000..2dff8e3cc4e --- /dev/null +++ b/db/migrate/20201030092151_add_requirements_access_level_to_project_features.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddRequirementsAccessLevelToProjectFeatures < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :project_features, :requirements_access_level, :integer, default: 20, null: false + end + end + + def down + with_lock_retries do + remove_column :project_features, :requirements_access_level, :integer + end + end +end diff --git a/db/migrate/20201103095752_add_issues_closed_at_index.rb b/db/migrate/20201103095752_add_issues_closed_at_index.rb new file mode 100644 index 00000000000..7a8ee4e8d67 --- /dev/null +++ b/db/migrate/20201103095752_add_issues_closed_at_index.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIssuesClosedAtIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index(:issues, [:project_id, :closed_at]) + end + + def down + remove_concurrent_index_by_name(:issues, 'index_issues_on_project_id_and_closed_at') + end +end diff --git a/db/schema_migrations/20201030092151 b/db/schema_migrations/20201030092151 new file mode 100644 index 00000000000..7b39a8e0dca --- /dev/null +++ b/db/schema_migrations/20201030092151 @@ -0,0 +1 @@ +ced03562d300f99abf687c258a25bf280a6c4f1798a893ee8a79189c09f19e6e
\ No newline at end of file diff --git a/db/schema_migrations/20201103095752 b/db/schema_migrations/20201103095752 new file mode 100644 index 00000000000..4888f7c5dfb --- /dev/null +++ b/db/schema_migrations/20201103095752 @@ -0,0 +1 @@ +3427cf92dc785f399329b00a3dded01dd2a6386cafbd0ef4b732bfcf522ce615
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index ee43e18c517..d09539ba641 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -14993,7 +14993,8 @@ CREATE TABLE project_features ( repository_access_level integer DEFAULT 20 NOT NULL, pages_access_level integer NOT NULL, forking_access_level integer, - metrics_dashboard_access_level integer + metrics_dashboard_access_level integer, + requirements_access_level integer DEFAULT 20 NOT NULL ); CREATE SEQUENCE project_features_id_seq @@ -20956,6 +20957,8 @@ CREATE INDEX index_issues_on_milestone_id ON issues USING btree (milestone_id); CREATE INDEX index_issues_on_moved_to_id ON issues USING btree (moved_to_id) WHERE (moved_to_id IS NOT NULL); +CREATE INDEX index_issues_on_project_id_and_closed_at ON issues USING btree (project_id, closed_at); + CREATE UNIQUE INDEX index_issues_on_project_id_and_external_key ON issues USING btree (project_id, external_key) WHERE (external_key IS NOT NULL); CREATE UNIQUE INDEX index_issues_on_project_id_and_iid ON issues USING btree (project_id, iid); |