Adds CI Platform Metrics bookkeeping model
What does this MR do?
Issue: #217707 (closed)
Adds a new table for storing CI platform metrics which can be consumed by periscope.
Up:
± bin/rake db:migrate:up VERSION=20200820204041
== 20200820204041 CreateCiPlatformMetrics: migrating ==========================
-- table_exists?(:ci_platform_metrics)
-> 0.0006s
-- create_table(:ci_platform_metrics)
-> 0.0041s
-- transaction_open?()
-> 0.0000s
-- execute("ALTER TABLE ci_platform_metrics\nADD CONSTRAINT check_f922abc32b\nCHECK ( char_length(platform_target) <= 255 )\nNOT VALID;\n")
-> 0.0003s
-- execute("ALTER TABLE ci_platform_metrics VALIDATE CONSTRAINT check_f922abc32b;")
-> 0.0004s
-- transaction_open?()
-> 0.0000s
-- index_exists?(:ci_variables, :key, {:algorithm=>:concurrently})
-> 0.0022s
-- add_index(:ci_variables, :key, {:algorithm=>:concurrently})
-> 0.0021s
== 20200820204041 CreateCiPlatformMetrics: migrated (0.0160s) =================
Down:
± bin/rake db:migrate:down VERSION=20200820204041
== 20200820204041 CreateCiPlatformMetrics: reverting ==========================
-- drop_table(:ci_platform_metrics)
-> 0.0034s
-- transaction_open?()
-> 0.0000s
-- index_exists?(:ci_variables, :key, {:algorithm=>:concurrently})
-> 0.0025s
-- remove_index(:ci_variables, {:algorithm=>:concurrently, :column=>:key})
-> 0.0024s
== 20200820204041 CreateCiPlatformMetrics: reverted (0.0087s) =================
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Amy Troschinetz