diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
commit | 84d1bd786125c1c14a3ba5f63e38a4cc736a9027 (patch) | |
tree | f550fa965f507077e20dbb6d61a8269a99ef7107 /db/post_migrate/20231205200925_drop_in_product_marketing_emails.rb | |
parent | 3a105e36e689f7b75482236712f1a47fd5a76814 (diff) |
Add latest changes from gitlab-org/gitlab@16-8-stable-eev16.8.0-rc42
Diffstat (limited to 'db/post_migrate/20231205200925_drop_in_product_marketing_emails.rb')
-rw-r--r-- | db/post_migrate/20231205200925_drop_in_product_marketing_emails.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/db/post_migrate/20231205200925_drop_in_product_marketing_emails.rb b/db/post_migrate/20231205200925_drop_in_product_marketing_emails.rb new file mode 100644 index 00000000000..5a121793333 --- /dev/null +++ b/db/post_migrate/20231205200925_drop_in_product_marketing_emails.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +# See https://docs.gitlab.com/ee/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class DropInProductMarketingEmails < Gitlab::Database::Migration[2.2] + milestone '16.8' + + def up + drop_table :in_product_marketing_emails + end + + def down + create_table :in_product_marketing_emails do |t| + t.bigint :user_id, null: false + t.datetime_with_timezone :cta_clicked_at + t.integer :track, null: false, limit: 2 + t.integer :series, null: false, limit: 2 + + t.timestamps_with_timezone + end + + add_index :in_product_marketing_emails, :user_id + add_index :in_product_marketing_emails, %i[user_id track series], unique: true, + name: 'index_in_product_marketing_emails_on_user_track_series' + add_index :in_product_marketing_emails, %i[track series id cta_clicked_at], + name: 'index_in_product_marketing_emails_on_track_series_id_clicked' + end +end |