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>2023-05-29 12:08:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-29 12:08:45 +0300
commitc3fe9f52152cd57f6790d30efc2d5e4b9dbf54dd (patch)
treeaf0e47e4d4ff68e36ed2c79c993096668ecb4966 /db
parentbceef0b492c1f4bc15c21c70cbe7aef34385a3da (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20230516110414_add_ml_model_max_file_size_to_plan_limits.rb7
-rw-r--r--db/post_migrate/20230515142300_add_unique_index_for_ml_model_packages.rb19
-rw-r--r--db/schema_migrations/202305151423001
-rw-r--r--db/schema_migrations/202305161104141
-rw-r--r--db/structure.sql5
5 files changed, 32 insertions, 1 deletions
diff --git a/db/migrate/20230516110414_add_ml_model_max_file_size_to_plan_limits.rb b/db/migrate/20230516110414_add_ml_model_max_file_size_to_plan_limits.rb
new file mode 100644
index 00000000000..938536dc4bc
--- /dev/null
+++ b/db/migrate/20230516110414_add_ml_model_max_file_size_to_plan_limits.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddMlModelMaxFileSizeToPlanLimits < Gitlab::Database::Migration[2.1]
+ def change
+ add_column(:plan_limits, :ml_model_max_file_size, :bigint, default: 10.gigabytes, null: false)
+ end
+end
diff --git a/db/post_migrate/20230515142300_add_unique_index_for_ml_model_packages.rb b/db/post_migrate/20230515142300_add_unique_index_for_ml_model_packages.rb
new file mode 100644
index 00000000000..a776c227032
--- /dev/null
+++ b/db/post_migrate/20230515142300_add_unique_index_for_ml_model_packages.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddUniqueIndexForMlModelPackages < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'uniq_idx_packages_packages_on_project_id_name_version_ml_model'
+ PACKAGE_TYPE_ML_MODEL = 14
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :packages_packages, [:project_id, :name, :version],
+ unique: true,
+ where: "package_type = #{PACKAGE_TYPE_ML_MODEL}",
+ name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name(:packages_packages, INDEX_NAME)
+ end
+end
diff --git a/db/schema_migrations/20230515142300 b/db/schema_migrations/20230515142300
new file mode 100644
index 00000000000..362c553959a
--- /dev/null
+++ b/db/schema_migrations/20230515142300
@@ -0,0 +1 @@
+365a9c05c660ba40b1b66256fa696cf8064388b4589b6d0bc507780e081526f2 \ No newline at end of file
diff --git a/db/schema_migrations/20230516110414 b/db/schema_migrations/20230516110414
new file mode 100644
index 00000000000..207e7fe65aa
--- /dev/null
+++ b/db/schema_migrations/20230516110414
@@ -0,0 +1 @@
+8a7d9123c689553d0aed06eea5714e9abd9f52cf6bc07b7349dcc723a3d8552a \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 5dfb95d10ef..440e5a3e086 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -20109,7 +20109,8 @@ CREATE TABLE plan_limits (
dashboard_limit_enabled_at timestamp with time zone,
web_hook_calls integer DEFAULT 0 NOT NULL,
project_access_token_limit integer DEFAULT 0 NOT NULL,
- google_cloud_logging_configurations integer DEFAULT 5 NOT NULL
+ google_cloud_logging_configurations integer DEFAULT 5 NOT NULL,
+ ml_model_max_file_size bigint DEFAULT '10737418240'::bigint NOT NULL
);
CREATE SEQUENCE plan_limits_id_seq
@@ -33197,6 +33198,8 @@ CREATE INDEX tmp_index_vulnerability_dismissal_info ON vulnerabilities USING btr
CREATE INDEX tmp_index_vulnerability_overlong_title_html ON vulnerabilities USING btree (id) WHERE (length(title_html) > 800);
+CREATE UNIQUE INDEX uniq_idx_packages_packages_on_project_id_name_version_ml_model ON packages_packages USING btree (project_id, name, version) WHERE (package_type = 14);
+
CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name);
CREATE UNIQUE INDEX uniq_pkgs_deb_grp_components_on_distribution_id_and_name ON packages_debian_group_components USING btree (distribution_id, name);