summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-17 12:09:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-17 12:09:26 +0000
commit75a4eaade04ee758bb3b253f27bf1c20c67991f0 (patch)
tree779b3011793bf35770774dbaa51eec55efd320cd /db
parent839e879bcf197a283da8481ddcb15b177172784d (diff)
downloadgitlab-ce-75a4eaade04ee758bb3b253f27bf1c20c67991f0.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210204152257_add_status_to_packages_packages.rb9
-rw-r--r--db/migrate/20210209171525_add_status_index_to_packages_packages.rb19
-rw-r--r--db/schema_migrations/202102041522571
-rw-r--r--db/schema_migrations/202102091715251
-rw-r--r--db/structure.sql5
5 files changed, 34 insertions, 1 deletions
diff --git a/db/migrate/20210204152257_add_status_to_packages_packages.rb b/db/migrate/20210204152257_add_status_to_packages_packages.rb
new file mode 100644
index 00000000000..4fd441048c6
--- /dev/null
+++ b/db/migrate/20210204152257_add_status_to_packages_packages.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddStatusToPackagesPackages < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def change
+ add_column :packages_packages, :status, :smallint, default: 0, null: false
+ end
+end
diff --git a/db/migrate/20210209171525_add_status_index_to_packages_packages.rb b/db/migrate/20210209171525_add_status_index_to_packages_packages.rb
new file mode 100644
index 00000000000..cb956165d6e
--- /dev/null
+++ b/db/migrate/20210209171525_add_status_index_to_packages_packages.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddStatusIndexToPackagesPackages < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_packages_packages_on_project_id_and_status'
+
+ def up
+ add_concurrent_index :packages_packages, [:project_id, :status], name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :packages_packages, name: INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20210204152257 b/db/schema_migrations/20210204152257
new file mode 100644
index 00000000000..c98d4637d05
--- /dev/null
+++ b/db/schema_migrations/20210204152257
@@ -0,0 +1 @@
+cb9f4b4e627cbc163653fc01c0542ef0ce87139b376c55bbaa4d7ab23e9b8973 \ No newline at end of file
diff --git a/db/schema_migrations/20210209171525 b/db/schema_migrations/20210209171525
new file mode 100644
index 00000000000..0c421b99a39
--- /dev/null
+++ b/db/schema_migrations/20210209171525
@@ -0,0 +1 @@
+5c661c453922181b350b8551d9a8f9b097e568459a2c2d128e41d9aefb026ab5 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index d582c343e73..97a2850fd5c 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -15244,7 +15244,8 @@ CREATE TABLE packages_packages (
name character varying NOT NULL,
version character varying,
package_type smallint NOT NULL,
- creator_id integer
+ creator_id integer,
+ status smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE packages_packages_id_seq
@@ -22886,6 +22887,8 @@ CREATE INDEX index_packages_packages_on_project_id_and_created_at ON packages_pa
CREATE INDEX index_packages_packages_on_project_id_and_package_type ON packages_packages USING btree (project_id, package_type);
+CREATE INDEX index_packages_packages_on_project_id_and_status ON packages_packages USING btree (project_id, status);
+
CREATE INDEX index_packages_packages_on_project_id_and_version ON packages_packages USING btree (project_id, version);
CREATE INDEX index_packages_project_id_name_partial_for_nuget ON packages_packages USING btree (project_id, name) WHERE (((name)::text <> 'NuGet.Temporary.Package'::text) AND (version IS NOT NULL) AND (package_type = 4));