summaryrefslogtreecommitdiff
path: root/db/migrate/20220803145637_create_user_project_callout.rb
blob: 1d0baf741a97c2c07e7296b03e9a028fd3ee0ce2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class CreateUserProjectCallout < Gitlab::Database::Migration[2.0]
  def up
    create_table :user_project_callouts do |t|
      t.bigint :user_id, null: false
      t.bigint :project_id, null: false
      t.integer :feature_name, limit: 2, null: false
      t.datetime_with_timezone :dismissed_at

      t.index :project_id
      t.index [:user_id, :feature_name, :project_id], unique: true, name: 'index_project_user_callouts_feature'
    end
  end

  def down
    drop_table :user_project_callouts
  end
end