blob: 27130136e9d061a951f0087474099a0bf6ec5adc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
class CreateMetricsUsersStarredDashboard < ActiveRecord::Migration[6.0]
DOWNTIME = false
# limit added in following migration db/migrate/20200424101920_add_text_limit_to_metrics_users_starred_dashboards_dashboard_path.rb
# to allow this migration to be run inside the transaction
# rubocop: disable Migration/AddLimitToTextColumns
def up
create_table :metrics_users_starred_dashboards do |t|
t.timestamps_with_timezone
t.bigint :project_id, null: false
t.bigint :user_id, null: false
t.text :dashboard_path, null: false
t.index :project_id
t.index %i(user_id project_id dashboard_path), name: "idx_metrics_users_starred_dashboard_on_user_project_dashboard", unique: true
end
end
# rubocop: enable Migration/AddLimitToTextColumns
def down
drop_table :metrics_users_starred_dashboards
end
end
|