diff options
Diffstat (limited to 'db/migrate/20210217101901_create_epic_list_user_preferences.rb')
-rw-r--r-- | db/migrate/20210217101901_create_epic_list_user_preferences.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20210217101901_create_epic_list_user_preferences.rb b/db/migrate/20210217101901_create_epic_list_user_preferences.rb new file mode 100644 index 00000000000..5aacea1938d --- /dev/null +++ b/db/migrate/20210217101901_create_epic_list_user_preferences.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class CreateEpicListUserPreferences < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + create_table :boards_epic_list_user_preferences do |t| + t.bigint :user_id, null: false + t.bigint :epic_list_id, index: true, null: false + t.timestamps_with_timezone null: false + t.boolean :collapsed, null: false, default: false + end + + add_index :boards_epic_list_user_preferences, [:user_id, :epic_list_id], unique: true, name: 'index_epic_board_list_preferences_on_user_and_list' + end + + def down + drop_table :boards_epic_list_user_preferences + end +end |