Add Value Stream Dashboard tracking table
What does this MR do and why?
This MR adds the Value Stream Dashboard tracking table where we keep track of the top-level namespaces which opted-in to use the VSD feature.
Columns:
- namespace_id: primary key, ideally, this will point to a top-level namespace (not validated yet)
- enabled: whether the aggregation (the feature) is enabled or not. We'll automatically disable the aggregation when a group downgrades, etc.
- last_run_at: keep track when was the last aggregation executed for the group.
Database
Up:
main: == [advisory_lock_connection] object_id: 275700, pg_backend_pid: 623945
main: == 20230427094534 CreateAnalyticsValueStreamDashboardAggregations: migrating ==
main: -- create_table(:value_stream_dashboard_aggregations, {:id=>false})
main: -> 0.0049s
main: == 20230427094534 CreateAnalyticsValueStreamDashboardAggregations: migrated (0.0170s)
ci: == [advisory_lock_connection] object_id: 275900, pg_backend_pid: 623947
ci: == 20230427094534 CreateAnalyticsValueStreamDashboardAggregations: migrating ==
ci: -- create_table(:value_stream_dashboard_aggregations, {:id=>false})
ci: -> 0.0041s
I, [2023-04-27T14:26:14.992166 #623812] INFO -- : Database: 'ci', Table: 'value_stream_dashboard_aggregations': Lock Writes
ci: == 20230427094534 CreateAnalyticsValueStreamDashboardAggregations: migrated (0.0164s)
Down:
ci: == [advisory_lock_connection] object_id: 274700, pg_backend_pid: 634714
ci: == 20230427094534 CreateAnalyticsValueStreamDashboardAggregations: reverting ==
ci: -- drop_table(:value_stream_dashboard_aggregations, {:id=>false})
ci: -> 0.0030s
ci: == 20230427094534 CreateAnalyticsValueStreamDashboardAggregations: reverted (0.0172s)
main: == [advisory_lock_connection] object_id: 274700, pg_backend_pid: 635161
main: == 20230427094534 CreateAnalyticsValueStreamDashboardAggregations: reverting ==
main: -- drop_table(:value_stream_dashboard_aggregations, {:id=>false})
main: -> 0.0037s
main: == 20230427094534 CreateAnalyticsValueStreamDashboardAggregations: reverted (0.0113s)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #402996 (closed)
Edited by Adam Hegyi