summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-18 00:09:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-18 00:09:02 +0000
commitc48065a833f9ead3357c48ea077165c15e8d585c (patch)
tree04a7ca91fe67ccdd002ff113d5b32fd4a70949a0 /db
parent1b2e02ede90c238ec2dfc26f12bb71b904c2f2ff (diff)
downloadgitlab-ce-c48065a833f9ead3357c48ea077165c15e8d585c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20201102184743_add_index_to_incident_issues_on_project_and_created_at.rb30
-rw-r--r--db/migrate/20201109180311_add_secret_detection_revocation_token_types_application_settings.rb13
-rw-r--r--db/migrate/20201109184023_add_text_limit_to_secret_detection_revocation_token_types_application_settings.rb17
-rw-r--r--db/schema_migrations/202011021847431
-rw-r--r--db/schema_migrations/202011091803111
-rw-r--r--db/schema_migrations/202011091840231
-rw-r--r--db/structure.sql6
7 files changed, 67 insertions, 2 deletions
diff --git a/db/migrate/20201102184743_add_index_to_incident_issues_on_project_and_created_at.rb b/db/migrate/20201102184743_add_index_to_incident_issues_on_project_and_created_at.rb
new file mode 100644
index 00000000000..1fd900002c3
--- /dev/null
+++ b/db/migrate/20201102184743_add_index_to_incident_issues_on_project_and_created_at.rb
@@ -0,0 +1,30 @@
+# frozen_string_literal: true
+
+class AddIndexToIncidentIssuesOnProjectAndCreatedAt < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ INCIDENT_TYPE = 1
+ OLD_INDEX_NAME = 'index_issues_project_id_issue_type_incident'
+ NEW_INDEX_NAME = 'index_issues_on_project_id_and_created_at_issue_type_incident'
+
+ DOWNTIME = false
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :issues,
+ [:project_id, :created_at],
+ where: "issue_type = #{INCIDENT_TYPE}",
+ name: NEW_INDEX_NAME
+
+ remove_concurrent_index_by_name :issues, OLD_INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :issues,
+ :project_id,
+ where: "issue_type = #{INCIDENT_TYPE}",
+ name: OLD_INDEX_NAME
+
+ remove_concurrent_index_by_name :issues, NEW_INDEX_NAME
+ end
+end
diff --git a/db/migrate/20201109180311_add_secret_detection_revocation_token_types_application_settings.rb b/db/migrate/20201109180311_add_secret_detection_revocation_token_types_application_settings.rb
new file mode 100644
index 00000000000..0823655f92f
--- /dev/null
+++ b/db/migrate/20201109180311_add_secret_detection_revocation_token_types_application_settings.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddSecretDetectionRevocationTokenTypesApplicationSettings < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def up
+ add_column :application_settings, :secret_detection_revocation_token_types_url, :text, null: true # rubocop:disable Migration/AddLimitToTextColumns
+ end
+
+ def down
+ remove_column :application_settings, :secret_detection_revocation_token_types_url
+ end
+end
diff --git a/db/migrate/20201109184023_add_text_limit_to_secret_detection_revocation_token_types_application_settings.rb b/db/migrate/20201109184023_add_text_limit_to_secret_detection_revocation_token_types_application_settings.rb
new file mode 100644
index 00000000000..9e0329aafcc
--- /dev/null
+++ b/db/migrate/20201109184023_add_text_limit_to_secret_detection_revocation_token_types_application_settings.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddTextLimitToSecretDetectionRevocationTokenTypesApplicationSettings < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :application_settings, :secret_detection_revocation_token_types_url, 255
+ end
+
+ def down
+ remove_text_limit :application_settings, :secret_detection_revocation_token_types_url
+ end
+end
diff --git a/db/schema_migrations/20201102184743 b/db/schema_migrations/20201102184743
new file mode 100644
index 00000000000..da002122e5d
--- /dev/null
+++ b/db/schema_migrations/20201102184743
@@ -0,0 +1 @@
+040e73d690cb315627fe16c931273aa1f86dfabb481dc2086f787d067b87642f \ No newline at end of file
diff --git a/db/schema_migrations/20201109180311 b/db/schema_migrations/20201109180311
new file mode 100644
index 00000000000..0752e2dabb3
--- /dev/null
+++ b/db/schema_migrations/20201109180311
@@ -0,0 +1 @@
+49143d2a7dd0a53c051151b0cdc93745a0fa1b01e6d54bb663e147c2064d9290 \ No newline at end of file
diff --git a/db/schema_migrations/20201109184023 b/db/schema_migrations/20201109184023
new file mode 100644
index 00000000000..7a66c0f0f4c
--- /dev/null
+++ b/db/schema_migrations/20201109184023
@@ -0,0 +1 @@
+698bcedf387fc01fbb7f1899f0f7660ba86a197fa72cf71d998cc90e3d1da9f3 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 9887a7c161e..f29f9178a26 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -9344,6 +9344,7 @@ CREATE TABLE application_settings (
new_user_signups_cap integer,
encrypted_cloud_license_auth_token text,
encrypted_cloud_license_auth_token_iv text,
+ secret_detection_revocation_token_types_url text,
CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)),
CONSTRAINT check_2dba05b802 CHECK ((char_length(gitpod_url) <= 255)),
CONSTRAINT check_51700b31b5 CHECK ((char_length(default_branch_name) <= 255)),
@@ -9351,6 +9352,7 @@ CREATE TABLE application_settings (
CONSTRAINT check_85a39b68ff CHECK ((char_length(encrypted_ci_jwt_signing_key_iv) <= 255)),
CONSTRAINT check_9a719834eb CHECK ((char_length(secret_detection_token_revocation_url) <= 255)),
CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)),
+ CONSTRAINT check_a5704163cc CHECK ((char_length(secret_detection_revocation_token_types_url) <= 255)),
CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)),
CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)),
CONSTRAINT check_e5aba18f02 CHECK ((char_length(container_registry_version) <= 255)),
@@ -21047,6 +21049,8 @@ CREATE INDEX index_issues_on_moved_to_id ON issues USING btree (moved_to_id) WHE
CREATE INDEX index_issues_on_project_id_and_closed_at ON issues USING btree (project_id, closed_at);
+CREATE INDEX index_issues_on_project_id_and_created_at_issue_type_incident ON issues USING btree (project_id, created_at) WHERE (issue_type = 1);
+
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);
@@ -21061,8 +21065,6 @@ CREATE INDEX index_issues_on_updated_at ON issues USING btree (updated_at);
CREATE INDEX index_issues_on_updated_by_id ON issues USING btree (updated_by_id) WHERE (updated_by_id IS NOT NULL);
-CREATE INDEX index_issues_project_id_issue_type_incident ON issues USING btree (project_id) WHERE (issue_type = 1);
-
CREATE UNIQUE INDEX index_jira_connect_installations_on_client_key ON jira_connect_installations USING btree (client_key);
CREATE INDEX index_jira_connect_subscriptions_on_namespace_id ON jira_connect_subscriptions USING btree (namespace_id);