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-30 18:09:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-30 18:09:38 +0300
commitaad78b57896307fff73539719d510a8c82be77f9 (patch)
tree22cf373de6921743c23dd694945f0a349880b4a2 /db
parent96e4317f73c749841cc1d808b788d43aa3407a4a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20230329235300_add_diagramsnet_to_application_settings.rb12
-rw-r--r--db/migrate/20230406115900_add_diagramsnet_text_limit.rb13
-rw-r--r--db/migrate/20230519103034_truncate_schema_inconsistencies_table.rb13
-rw-r--r--db/migrate/20230519112106_add_diff_column_to_schema_inconsistencies.rb12
-rw-r--r--db/migrate/20230519135414_add_text_limit_for_diff.rb13
-rw-r--r--db/post_migrate/20230521521419_drop_merge_request_state_id_temp_index.rb16
-rw-r--r--db/schema_migrations/202303292353001
-rw-r--r--db/schema_migrations/202304061159001
-rw-r--r--db/schema_migrations/202305191030341
-rw-r--r--db/schema_migrations/202305191121061
-rw-r--r--db/schema_migrations/202305191354141
-rw-r--r--db/schema_migrations/202305215214191
-rw-r--r--db/structure.sql7
13 files changed, 90 insertions, 2 deletions
diff --git a/db/migrate/20230329235300_add_diagramsnet_to_application_settings.rb b/db/migrate/20230329235300_add_diagramsnet_to_application_settings.rb
new file mode 100644
index 00000000000..9e351f190f4
--- /dev/null
+++ b/db/migrate/20230329235300_add_diagramsnet_to_application_settings.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class AddDiagramsnetToApplicationSettings < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # limit is added in 20230406115900_add_diagramsnet_text_limit.rb
+ def change
+ add_column :application_settings, :diagramsnet_enabled, :boolean, default: true, null: false
+ add_column :application_settings, :diagramsnet_url, :text, default: 'https://embed.diagrams.net'
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+end
diff --git a/db/migrate/20230406115900_add_diagramsnet_text_limit.rb b/db/migrate/20230406115900_add_diagramsnet_text_limit.rb
new file mode 100644
index 00000000000..27155c70c56
--- /dev/null
+++ b/db/migrate/20230406115900_add_diagramsnet_text_limit.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddDiagramsnetTextLimit < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :application_settings, :diagramsnet_url, 2048
+ end
+
+ def down
+ remove_text_limit :application_settings, :diagramsnet_url
+ end
+end
diff --git a/db/migrate/20230519103034_truncate_schema_inconsistencies_table.rb b/db/migrate/20230519103034_truncate_schema_inconsistencies_table.rb
new file mode 100644
index 00000000000..ddf165ca991
--- /dev/null
+++ b/db/migrate/20230519103034_truncate_schema_inconsistencies_table.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class TruncateSchemaInconsistenciesTable < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ truncate_tables!('schema_inconsistencies')
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/migrate/20230519112106_add_diff_column_to_schema_inconsistencies.rb b/db/migrate/20230519112106_add_diff_column_to_schema_inconsistencies.rb
new file mode 100644
index 00000000000..7b42fc233ff
--- /dev/null
+++ b/db/migrate/20230519112106_add_diff_column_to_schema_inconsistencies.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class AddDiffColumnToSchemaInconsistencies < Gitlab::Database::Migration[2.1]
+ # rubocop:disable Migration/AddLimitToTextColumns
+ # rubocop:disable Rails/NotNullColumn
+ # limit is added in 20230519135414
+ def change
+ add_column :schema_inconsistencies, :diff, :text, null: false
+ end
+ # rubocop:enable Migration/AddLimitToTextColumns
+ # rubocop:enable Rails/NotNullColumn
+end
diff --git a/db/migrate/20230519135414_add_text_limit_for_diff.rb b/db/migrate/20230519135414_add_text_limit_for_diff.rb
new file mode 100644
index 00000000000..682e28297db
--- /dev/null
+++ b/db/migrate/20230519135414_add_text_limit_for_diff.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddTextLimitForDiff < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit :schema_inconsistencies, :diff, 6144
+ end
+
+ def down
+ remove_text_limit :schema_inconsistencies, :diff
+ end
+end
diff --git a/db/post_migrate/20230521521419_drop_merge_request_state_id_temp_index.rb b/db/post_migrate/20230521521419_drop_merge_request_state_id_temp_index.rb
new file mode 100644
index 00000000000..3411b374d7e
--- /dev/null
+++ b/db/post_migrate/20230521521419_drop_merge_request_state_id_temp_index.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class DropMergeRequestStateIdTempIndex < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'merge_requests_state_id_temp_index'
+ INDEX_CONDITION = "state_id IN (2, 3)"
+
+ disable_ddl_transaction!
+
+ def up
+ remove_concurrent_index(:merge_requests, :id, where: INDEX_CONDITION, name: INDEX_NAME)
+ end
+
+ def down
+ add_concurrent_index(:merge_requests, :id, where: INDEX_CONDITION, name: INDEX_NAME)
+ end
+end
diff --git a/db/schema_migrations/20230329235300 b/db/schema_migrations/20230329235300
new file mode 100644
index 00000000000..0f3d4099553
--- /dev/null
+++ b/db/schema_migrations/20230329235300
@@ -0,0 +1 @@
+44df5e98715af0cf9f8920e8fc35754901d578ae5c1dcc5fa7a3fb9ee49f995b \ No newline at end of file
diff --git a/db/schema_migrations/20230406115900 b/db/schema_migrations/20230406115900
new file mode 100644
index 00000000000..38fa9134dac
--- /dev/null
+++ b/db/schema_migrations/20230406115900
@@ -0,0 +1 @@
+85cf98db148785c25a6ed472a300f5967aea916ef9b937d78bff90e33905886f \ No newline at end of file
diff --git a/db/schema_migrations/20230519103034 b/db/schema_migrations/20230519103034
new file mode 100644
index 00000000000..cfefd850e23
--- /dev/null
+++ b/db/schema_migrations/20230519103034
@@ -0,0 +1 @@
+99247380d6a83a3eb0d03270848d7a53276072633073343a5b3bda709b836694 \ No newline at end of file
diff --git a/db/schema_migrations/20230519112106 b/db/schema_migrations/20230519112106
new file mode 100644
index 00000000000..a8eb4476be6
--- /dev/null
+++ b/db/schema_migrations/20230519112106
@@ -0,0 +1 @@
+be307c86a15692e694a276b52274ae400a90f31dfb7fde6ace37683fba1ed4b2 \ No newline at end of file
diff --git a/db/schema_migrations/20230519135414 b/db/schema_migrations/20230519135414
new file mode 100644
index 00000000000..159130e2d44
--- /dev/null
+++ b/db/schema_migrations/20230519135414
@@ -0,0 +1 @@
+e0aaa0eb24b0e2be91593198366d85408ea5b88399c1a2bd4e41fa9acabeb227 \ No newline at end of file
diff --git a/db/schema_migrations/20230521521419 b/db/schema_migrations/20230521521419
new file mode 100644
index 00000000000..9591cbde586
--- /dev/null
+++ b/db/schema_migrations/20230521521419
@@ -0,0 +1 @@
+04dd0a9bdfe5890f8a44aa15bbbc295a25883bb27fbee0015937a1f6c432a231 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 123cf711672..a23d01c628e 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -11837,6 +11837,8 @@ CREATE TABLE application_settings (
remember_me_enabled boolean DEFAULT true NOT NULL,
encrypted_anthropic_api_key bytea,
encrypted_anthropic_api_key_iv bytea,
+ diagramsnet_enabled boolean DEFAULT true NOT NULL,
+ diagramsnet_url text DEFAULT 'https://embed.diagrams.net'::text,
allow_account_deletion boolean DEFAULT true NOT NULL,
vertex_project text,
wiki_asciidoc_allow_uri_includes boolean DEFAULT false NOT NULL,
@@ -11856,6 +11858,7 @@ CREATE TABLE application_settings (
CONSTRAINT app_settings_registry_repair_worker_max_concurrency_positive CHECK ((container_registry_data_repair_detail_worker_max_concurrency >= 0)),
CONSTRAINT app_settings_yaml_max_depth_positive CHECK ((max_yaml_depth > 0)),
CONSTRAINT app_settings_yaml_max_size_positive CHECK ((max_yaml_size_bytes > 0)),
+ CONSTRAINT check_0542340619 CHECK ((char_length(diagramsnet_url) <= 2048)),
CONSTRAINT check_17d9558205 CHECK ((char_length((kroki_url)::text) <= 1024)),
CONSTRAINT check_2b820eaac3 CHECK ((char_length(database_grafana_tag) <= 255)),
CONSTRAINT check_2dba05b802 CHECK ((char_length(gitpod_url) <= 255)),
@@ -22256,6 +22259,8 @@ CREATE TABLE schema_inconsistencies (
object_name text NOT NULL,
table_name text NOT NULL,
valitador_name text NOT NULL,
+ diff text NOT NULL,
+ CONSTRAINT check_001d186ac7 CHECK ((char_length(diff) <= 6144)),
CONSTRAINT check_120b6c86d0 CHECK ((char_length(valitador_name) <= 63)),
CONSTRAINT check_a0411f31fd CHECK ((char_length(object_name) <= 63)),
CONSTRAINT check_d96408dfd2 CHECK ((char_length(table_name) <= 63))
@@ -33101,8 +33106,6 @@ CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_and_note_id_index ON me
CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_index ON merge_request_user_mentions USING btree (merge_request_id) WHERE (note_id IS NULL);
-CREATE INDEX merge_requests_state_id_temp_index ON merge_requests USING btree (id) WHERE (state_id = ANY (ARRAY[2, 3]));
-
CREATE INDEX migrate_index_users_for_active_billable_users ON users USING btree (id) WHERE (((state)::text = 'active'::text) AND ((user_type IS NULL) OR (user_type = 0) OR (user_type = ANY (ARRAY[0, 6, 4, 13]))) AND ((user_type IS NULL) OR (user_type = 0) OR (user_type = ANY (ARRAY[0, 4, 5]))));
CREATE INDEX note_mentions_temp_index ON notes USING btree (id, noteable_type) WHERE (note ~~ '%@%'::text);