diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-01 12:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-01 12:09:24 +0300 |
commit | 3b1df712c7a15c9b6abadd61e9c8894fdeb0442a (patch) | |
tree | 6b9ca4abcc0f2114b86f40a49c3715005d1791c1 /db | |
parent | 8f535d9082bb0f10f2ef6b9133dbc77691ace4db (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb | 21 | ||||
-rw-r--r-- | db/migrate/20230525064706_add_service_desk_enabled_to_service_desk_settings.rb | 7 | ||||
-rw-r--r-- | db/migrate/20230530003417_rename_tofa_settings.rb | 21 | ||||
-rw-r--r-- | db/post_migrate/20230530003634_cleanup_tofa_settings.rb | 23 | ||||
-rw-r--r-- | db/schema_migrations/20230524012641 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20230525064706 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20230530003417 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20230530003634 | 1 | ||||
-rw-r--r-- | db/structure.sql | 11 |
9 files changed, 83 insertions, 4 deletions
diff --git a/db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb b/db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb new file mode 100644 index 00000000000..99f178959ee --- /dev/null +++ b/db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddVertexAiHostToApplicationSettings < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + with_lock_retries do + add_column :application_settings, :vertex_ai_host, :text, if_not_exists: true + end + + add_text_limit :application_settings, :vertex_ai_host, 255 + end + + def down + remove_text_limit :application_settings, :vertex_ai_host + + with_lock_retries do + remove_column :application_settings, :vertex_ai_host, if_exists: true + end + end +end diff --git a/db/migrate/20230525064706_add_service_desk_enabled_to_service_desk_settings.rb b/db/migrate/20230525064706_add_service_desk_enabled_to_service_desk_settings.rb new file mode 100644 index 00000000000..ed2d679bca5 --- /dev/null +++ b/db/migrate/20230525064706_add_service_desk_enabled_to_service_desk_settings.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddServiceDeskEnabledToServiceDeskSettings < Gitlab::Database::Migration[2.1] + def change + add_column :service_desk_settings, :service_desk_enabled, :boolean, null: false, default: true + end +end diff --git a/db/migrate/20230530003417_rename_tofa_settings.rb b/db/migrate/20230530003417_rename_tofa_settings.rb new file mode 100644 index 00000000000..2ce88fe85f2 --- /dev/null +++ b/db/migrate/20230530003417_rename_tofa_settings.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class RenameTofaSettings < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + rename_column_concurrently :application_settings, :encrypted_tofa_credentials, :encrypted_vertex_ai_credentials + rename_column_concurrently :application_settings, :encrypted_tofa_credentials_iv, + :encrypted_vertex_ai_credentials_iv + + rename_column_concurrently :application_settings, :vertex_project, :vertex_ai_project + end + + def down + undo_rename_column_concurrently :application_settings, :encrypted_tofa_credentials, :encrypted_vertex_ai_credentials + undo_rename_column_concurrently :application_settings, :encrypted_tofa_credentials_iv, + :encrypted_vertex_ai_credentials_iv + + undo_rename_column_concurrently :application_settings, :vertex_project, :vertex_ai_project + end +end diff --git a/db/post_migrate/20230530003634_cleanup_tofa_settings.rb b/db/post_migrate/20230530003634_cleanup_tofa_settings.rb new file mode 100644 index 00000000000..0e580a52bfd --- /dev/null +++ b/db/post_migrate/20230530003634_cleanup_tofa_settings.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class CleanupTofaSettings < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + cleanup_concurrent_column_rename :application_settings, :encrypted_tofa_credentials, + :encrypted_vertex_ai_credentials + cleanup_concurrent_column_rename :application_settings, :encrypted_tofa_credentials_iv, + :encrypted_vertex_ai_credentials_iv + cleanup_concurrent_column_rename :application_settings, :vertex_project, + :vertex_ai_project + end + + def down + undo_cleanup_concurrent_column_rename :application_settings, :encrypted_tofa_credentials, + :encrypted_vertex_ai_credentials + undo_cleanup_concurrent_column_rename :application_settings, :encrypted_tofa_credentials_iv, + :encrypted_vertex_ai_credentials_iv + undo_cleanup_concurrent_column_rename :application_settings, :vertex_project, + :vertex_ai_project + end +end diff --git a/db/schema_migrations/20230524012641 b/db/schema_migrations/20230524012641 new file mode 100644 index 00000000000..7f01ad8b013 --- /dev/null +++ b/db/schema_migrations/20230524012641 @@ -0,0 +1 @@ +3fa8bd64992a6c1bf7d9dc1d9fca2173b425df72d9b5e44fcc72ebbca93d3995
\ No newline at end of file diff --git a/db/schema_migrations/20230525064706 b/db/schema_migrations/20230525064706 new file mode 100644 index 00000000000..dbd9a6a5425 --- /dev/null +++ b/db/schema_migrations/20230525064706 @@ -0,0 +1 @@ +e532fbf81ec8ce67616f93945c7ac384ff491410227a388aff7a2a01c43e4f2a
\ No newline at end of file diff --git a/db/schema_migrations/20230530003417 b/db/schema_migrations/20230530003417 new file mode 100644 index 00000000000..e75305f71a8 --- /dev/null +++ b/db/schema_migrations/20230530003417 @@ -0,0 +1 @@ +4604d184499892cace131232cdf728745b0e616261bdcfa6acd5ff304056759b
\ No newline at end of file diff --git a/db/schema_migrations/20230530003634 b/db/schema_migrations/20230530003634 new file mode 100644 index 00000000000..28f38a3d676 --- /dev/null +++ b/db/schema_migrations/20230530003634 @@ -0,0 +1 @@ +0c2334dff5bb442d05e9b4c5cfe03128dfebf8d085625ce9df1b7bdc33ed439c
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index acdbe3e2cb9..0a510da3292 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -11812,8 +11812,6 @@ CREATE TABLE application_settings ( silent_mode_enabled boolean DEFAULT false NOT NULL, package_metadata_purl_types smallint[] DEFAULT '{}'::smallint[], ci_max_includes integer DEFAULT 150 NOT NULL, - encrypted_tofa_credentials bytea, - encrypted_tofa_credentials_iv bytea, encrypted_tofa_host bytea, encrypted_tofa_host_iv bytea, encrypted_tofa_url bytea, @@ -11840,12 +11838,15 @@ CREATE TABLE application_settings ( 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, namespace_aggregation_schedule_lease_duration_in_seconds integer DEFAULT 300 NOT NULL, container_registry_data_repair_detail_worker_max_concurrency integer DEFAULT 2 NOT NULL, encrypted_ai_access_token bytea, encrypted_ai_access_token_iv bytea, + vertex_ai_host text, + encrypted_vertex_ai_credentials bytea, + encrypted_vertex_ai_credentials_iv bytea, + vertex_ai_project text, 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)), @@ -11861,6 +11862,7 @@ CREATE TABLE application_settings ( 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_12f01f1dcd CHECK ((char_length(vertex_ai_project) <= 255)), 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)), @@ -11887,7 +11889,7 @@ CREATE TABLE application_settings ( CONSTRAINT check_9a719834eb CHECK ((char_length(secret_detection_token_revocation_url) <= 255)), CONSTRAINT check_9c6c447a13 CHECK ((char_length(maintenance_mode_message) <= 255)), CONSTRAINT check_a5704163cc CHECK ((char_length(secret_detection_revocation_token_types_url) <= 255)), - CONSTRAINT check_a8dc89f7c2 CHECK ((char_length(vertex_project) <= 255)), + CONSTRAINT check_ae53cf7f82 CHECK ((char_length(vertex_ai_host) <= 255)), CONSTRAINT check_b8c74ea5b3 CHECK ((char_length(deactivation_email_additional_text) <= 1000)), CONSTRAINT check_d03919528d CHECK ((char_length(container_registry_vendor) <= 255)), CONSTRAINT check_d820146492 CHECK ((char_length(spam_check_endpoint_url) <= 255)), @@ -22577,6 +22579,7 @@ CREATE TABLE service_desk_settings ( custom_email_smtp_username text, encrypted_custom_email_smtp_password bytea, encrypted_custom_email_smtp_password_iv bytea, + service_desk_enabled boolean DEFAULT true NOT NULL, CONSTRAINT check_57a79552e1 CHECK ((char_length(custom_email) <= 255)), CONSTRAINT check_b283637a9e CHECK ((char_length(custom_email_smtp_address) <= 255)), CONSTRAINT check_e3535d46ee CHECK ((char_length(custom_email_smtp_username) <= 255)) |