Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-04 03:09:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-04 03:09:37 +0300
commite3bdfa1a13d7e6c92716324c78b5b20c07eeb7c6 (patch)
treee8776263096b027d32d4be5118cccc87b00de2bc /db
parentc1a50b8195f4e36fda9b233acbde57a449bcf6c3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200330123739_remove_index_ci_builds_on_name_for_security_reports_values.rb22
-rw-r--r--db/post_migrate/20200319071702_consume_remaining_link_lfs_objects_projects_jobs.rb15
-rw-r--r--db/structure.sql4
3 files changed, 39 insertions, 2 deletions
diff --git a/db/migrate/20200330123739_remove_index_ci_builds_on_name_for_security_reports_values.rb b/db/migrate/20200330123739_remove_index_ci_builds_on_name_for_security_reports_values.rb
new file mode 100644
index 00000000000..7ab57183e18
--- /dev/null
+++ b/db/migrate/20200330123739_remove_index_ci_builds_on_name_for_security_reports_values.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class RemoveIndexCiBuildsOnNameForSecurityReportsValues < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_ci_builds_on_name_for_security_reports_values'
+
+ def up
+ remove_concurrent_index_by_name :ci_builds, INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :ci_builds,
+ :name,
+ name: INDEX_NAME,
+ where: "((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('license_scanning'::character varying)::text]))"
+ end
+end
diff --git a/db/post_migrate/20200319071702_consume_remaining_link_lfs_objects_projects_jobs.rb b/db/post_migrate/20200319071702_consume_remaining_link_lfs_objects_projects_jobs.rb
new file mode 100644
index 00000000000..63fa0234a5b
--- /dev/null
+++ b/db/post_migrate/20200319071702_consume_remaining_link_lfs_objects_projects_jobs.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class ConsumeRemainingLinkLfsObjectsProjectsJobs < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ Gitlab::BackgroundMigration.steal('LinkLfsObjectsProjects')
+ end
+
+ def down
+ # no-op as there is no need to do anything if this gets rolled back
+ end
+end
diff --git a/db/structure.sql b/db/structure.sql
index 94d98c68f48..25855aeadc0 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -8672,8 +8672,6 @@ CREATE INDEX index_ci_builds_on_commit_id_and_type_and_ref ON public.ci_builds U
CREATE INDEX index_ci_builds_on_name_and_security_type_eq_ci_build ON public.ci_builds USING btree (name, id) WHERE (((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('license_scanning'::character varying)::text])) AND ((type)::text = 'Ci::Build'::text));
-CREATE INDEX index_ci_builds_on_name_for_security_reports_values ON public.ci_builds USING btree (name) WHERE ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('sast'::character varying)::text, ('license_scanning'::character varying)::text]));
-
CREATE INDEX index_ci_builds_on_project_id_and_id ON public.ci_builds USING btree (project_id, id);
CREATE INDEX index_ci_builds_on_project_id_and_name_and_ref ON public.ci_builds USING btree (project_id, name, ref) WHERE (((type)::text = 'Ci::Build'::text) AND ((status)::text = 'success'::text) AND ((retried = false) OR (retried IS NULL)));
@@ -12902,6 +12900,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200318164448
20200318165448
20200318175008
+20200319071702
20200319123041
20200319203901
20200320112455
@@ -12927,6 +12926,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200326145443
20200330074719
20200330121000
+20200330123739
20200330132913
20200331220930
\.