diff options
author | Reuben Pereira <rpereira@gitlab.com> | 2019-04-26 20:23:26 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-26 20:23:26 +0300 |
commit | 4376167a04aaeed084ad93aab2e65550109235c6 (patch) | |
tree | 99fa950932bf6ea5c0d453c9d4494a0adb0c16f3 /db/migrate/20190422082247_create_project_metrics_settings.rb | |
parent | bb6908cd5bcb14d70dfadbc2a16d7310bfa65445 (diff) |
Add ProjectMetricsDashboardSetting model and table
This new table will be used to store the external_dashboard_url which
allows users to add a link to their external dashboards (ex Grafana)
to the Metrics dashboard.
Diffstat (limited to 'db/migrate/20190422082247_create_project_metrics_settings.rb')
-rw-r--r-- | db/migrate/20190422082247_create_project_metrics_settings.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20190422082247_create_project_metrics_settings.rb b/db/migrate/20190422082247_create_project_metrics_settings.rb new file mode 100644 index 00000000000..3e21dd0a934 --- /dev/null +++ b/db/migrate/20190422082247_create_project_metrics_settings.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class CreateProjectMetricsSettings < ActiveRecord::Migration[5.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + create_table :project_metrics_settings, id: :int, primary_key: :project_id, default: nil do |t| + t.string :external_dashboard_url, null: false + t.foreign_key :projects, column: :project_id, on_delete: :cascade + end + end +end |