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

20210823172643_create_user_group_callout.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 72341c0b2754caabb17fe297d870d96e67b65fb8 (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 CreateUserGroupCallout < ActiveRecord::Migration[6.1]
  def up
    create_table :user_group_callouts do |t|
      t.bigint :user_id, null: false
      t.bigint :group_id, null: false
      t.integer :feature_name, limit: 2, null: false
      t.datetime_with_timezone :dismissed_at

      t.index :group_id
      t.index [:user_id, :feature_name, :group_id], unique: true, name: 'index_group_user_callouts_feature'
    end
  end

  def down
    drop_table :user_group_callouts
  end
end