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

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

class CreateBoardUserPreferences < ActiveRecord::Migration[6.0]
  DOWNTIME = false

  def up
    create_table :board_user_preferences do |t|
      t.bigint :user_id, null: false, index: true
      t.bigint :board_id, null: false, index: true
      t.boolean :hide_labels
      t.timestamps_with_timezone null: false
    end

    add_index :board_user_preferences, [:user_id, :board_id], unique: true
  end

  def down
    # rubocop:disable Migration/DropTable
    drop_table :board_user_preferences
    # rubocop:enable Migration/DropTable
  end
end