diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
commit | 9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch) | |
tree | 865198c01d1824a9b098127baa3ab980c9cd2c06 /db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb | |
parent | 6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff) |
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb')
-rw-r--r-- | db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb b/db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb new file mode 100644 index 00000000000..98bb15dd76e --- /dev/null +++ b/db/post_migrate/20231122100006_remove_custom_email_smtp_columns_from_service_desk_settings.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +class RemoveCustomEmailSmtpColumnsFromServiceDeskSettings < Gitlab::Database::Migration[2.2] + MAXIMUM_LIMIT = 255 + + milestone '16.7' + + disable_ddl_transaction! + + def up + with_lock_retries do + remove_column :service_desk_settings, :custom_email_smtp_address + remove_column :service_desk_settings, :custom_email_smtp_port + remove_column :service_desk_settings, :custom_email_smtp_username + remove_column :service_desk_settings, :encrypted_custom_email_smtp_password + remove_column :service_desk_settings, :encrypted_custom_email_smtp_password_iv + end + end + + def down + with_lock_retries do + add_column :service_desk_settings, :custom_email_smtp_address, :text + add_column :service_desk_settings, :custom_email_smtp_port, :integer + add_column :service_desk_settings, :custom_email_smtp_username, :text + add_column :service_desk_settings, :encrypted_custom_email_smtp_password, :binary + add_column :service_desk_settings, :encrypted_custom_email_smtp_password_iv, :binary + end + + add_text_limit :service_desk_settings, :custom_email_smtp_address, MAXIMUM_LIMIT + add_text_limit :service_desk_settings, :custom_email_smtp_username, MAXIMUM_LIMIT + end +end |