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-04-05 06:08:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-05 06:08:20 +0300
commitb2814abdec5fc79e34936d651e7e7fc68858237f (patch)
tree4b57ecd36c51ce564e8105b3938af7192e02fccc /db
parent92a2c36b8cbbe4a7c0991312c28aa088a15201e6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb8
-rw-r--r--db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb17
-rw-r--r--db/schema_migrations/202304030234401
-rw-r--r--db/schema_migrations/202304030234411
-rw-r--r--db/structure.sql1
5 files changed, 28 insertions, 0 deletions
diff --git a/db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb b/db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb
new file mode 100644
index 00000000000..136855403f9
--- /dev/null
+++ b/db/migrate/20230403023440_add_database_max_running_batched_background_migrations_to_application_settings.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+class AddDatabaseMaxRunningBatchedBackgroundMigrationsToApplicationSettings < Gitlab::Database::Migration[2.1]
+ def change
+ add_column :application_settings, :database_max_running_batched_background_migrations,
+ :integer, null: false, default: 2
+ end
+end
diff --git a/db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb b/db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb
new file mode 100644
index 00000000000..6e8d423e679
--- /dev/null
+++ b/db/migrate/20230403023441_set_max_running_batched_background_migrations_for_gitlab_com.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class SetMaxRunningBatchedBackgroundMigrationsForGitlabCom < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ return unless Gitlab.com? && !Gitlab.jh?
+
+ execute 'UPDATE application_settings SET database_max_running_batched_background_migrations = 4'
+ end
+
+ def down
+ return unless Gitlab.com? && !Gitlab.jh?
+
+ execute 'UPDATE application_settings SET database_max_running_batched_background_migrations = 2'
+ end
+end
diff --git a/db/schema_migrations/20230403023440 b/db/schema_migrations/20230403023440
new file mode 100644
index 00000000000..2705965c70c
--- /dev/null
+++ b/db/schema_migrations/20230403023440
@@ -0,0 +1 @@
+0cd1bcb2a2a02c09e7fd9271f815522adc1c20a1b39953349cfe2fff4541ed66 \ No newline at end of file
diff --git a/db/schema_migrations/20230403023441 b/db/schema_migrations/20230403023441
new file mode 100644
index 00000000000..6e259200d0e
--- /dev/null
+++ b/db/schema_migrations/20230403023441
@@ -0,0 +1 @@
+e9684618df40260a7bae8b3dc217f3dd662e1cbc5db8b8a6d0334716e034c77b \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 98b006c0ac3..89de87610b7 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -11756,6 +11756,7 @@ CREATE TABLE application_settings (
database_apdex_settings jsonb,
encrypted_openai_api_key bytea,
encrypted_openai_api_key_iv bytea,
+ database_max_running_batched_background_migrations integer DEFAULT 2 NOT NULL,
CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)),
CONSTRAINT app_settings_container_registry_pre_import_tags_rate_positive CHECK ((container_registry_pre_import_tags_rate >= (0)::numeric)),
CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)),