blob: b3df3ea281bb876847bf1cd63a184a9d8046626b (
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 CreateAnalyticsDashboardsConfigurationPointers < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
create_table :analytics_dashboards_pointers do |t|
t.belongs_to :namespace,
null: false,
index: { unique: true },
foreign_key: { to_table: :namespaces, on_delete: :cascade }
t.belongs_to :project, null: false, foreign_key: { to_table: :projects, on_delete: :cascade }
end
end
def down
drop_table :analytics_dashboards_pointers
end
end
|