debian-mirror-gitlab/db/migrate/20221222144954_create_analytics_dashboards_configuration_pointers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
579 B
Ruby
Raw Normal View History

2023-03-17 16:20:25 +05:30
# 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