Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20221027203951_drop_experiment_users_table.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 95455db98e5c6f08df0fc0cecf8beb916cbe9253 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

class DropExperimentUsersTable < Gitlab::Database::Migration[2.0]
  def up
    drop_table :experiment_users
  end

  def down
    create_table :experiment_users do |t| # rubocop:disable Migration/SchemaAdditionMethodsNoPost
      t.bigint :experiment_id, null: false
      t.bigint :user_id, null: false
      t.integer :group_type, limit: 2, null: false, default: 0
      t.timestamps_with_timezone null: false
      t.datetime_with_timezone :converted_at
      t.jsonb :context, null: false, default: {}
    end

    add_index :experiment_users, :experiment_id
    add_index :experiment_users, :user_id
  end
end