diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-01 03:08:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-01 03:08:54 +0000 |
commit | 83938fbe7301b0e8b8d621736d39d23860243deb (patch) | |
tree | cb9e9cf53492483123080624e9a47a0395d77002 /db/post_migrate | |
parent | 9e10cf71176a52bca6b05a0d9255f9486bb91d9f (diff) | |
download | gitlab-ce-83938fbe7301b0e8b8d621736d39d23860243deb.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate')
-rw-r--r-- | db/post_migrate/20230425114355_remove_application_settings_clickhouse_connection_string.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/post_migrate/20230425114355_remove_application_settings_clickhouse_connection_string.rb b/db/post_migrate/20230425114355_remove_application_settings_clickhouse_connection_string.rb new file mode 100644 index 00000000000..d5bdd33a952 --- /dev/null +++ b/db/post_migrate/20230425114355_remove_application_settings_clickhouse_connection_string.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class RemoveApplicationSettingsClickhouseConnectionString < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + remove_column :application_settings, :clickhouse_connection_string + end + + def down + unless column_exists?(:application_settings, :clickhouse_connection_string) + # rubocop:disable Migration/SchemaAdditionMethodsNoPost + add_column :application_settings, :clickhouse_connection_string, :text + # rubocop:enable Migration/SchemaAdditionMethodsNoPost + end + + add_text_limit :application_settings, :clickhouse_connection_string, 1024 + end +end |