diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-14 11:41:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-14 11:41:52 +0300 |
commit | 585826cb22ecea5998a2c2a4675735c94bdeedac (patch) | |
tree | 5b05f0b30d33cef48963609e8a18a4dff260eab3 /db/post_migrate/20231018083247_remove_users_email_opted_in_columns.rb | |
parent | df221d036e5d0c6c0ee4d55b9c97f481ee05dee8 (diff) |
Add latest changes from gitlab-org/gitlab@16-6-stable-eev16.6.0-rc42
Diffstat (limited to 'db/post_migrate/20231018083247_remove_users_email_opted_in_columns.rb')
-rw-r--r-- | db/post_migrate/20231018083247_remove_users_email_opted_in_columns.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/db/post_migrate/20231018083247_remove_users_email_opted_in_columns.rb b/db/post_migrate/20231018083247_remove_users_email_opted_in_columns.rb new file mode 100644 index 00000000000..a77ccb599df --- /dev/null +++ b/db/post_migrate/20231018083247_remove_users_email_opted_in_columns.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class RemoveUsersEmailOptedInColumns < Gitlab::Database::Migration[2.1] + enable_lock_retries! + + def up + remove_column :users, :email_opted_in + remove_column :users, :email_opted_in_ip + remove_column :users, :email_opted_in_source_id + remove_column :users, :email_opted_in_at + end + + # This migration removes columns. Disabling rule only for rollback action + # rubocop:disable Migration/AddColumnsToWideTables + def down + add_column :users, :email_opted_in, :boolean + add_column :users, :email_opted_in_ip, :string + add_column :users, :email_opted_in_source_id, :integer + add_column :users, :email_opted_in_at, :datetime_with_timezone + end + # rubocop:enable Migration/AddColumnsToWideTables +end |