This repository has been archived by the owner on Sep 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Responding to review and fixing failing tests.
This includes a couple of pgsql workarounds and sql scripts.
- Loading branch information
Showing
7 changed files
with
246 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
-- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. | ||
|
||
-- MySQL database for the tracker module, version 1.2.0 | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_producer` ( | ||
`producer_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`community_id` bigint(20) NOT NULL, | ||
`repository` varchar(255) NOT NULL, | ||
`executable_name` varchar(255) NOT NULL, | ||
`display_name` varchar(255) NOT NULL, | ||
`description` text NOT NULL, | ||
`revision_url` text NOT NULL, | ||
PRIMARY KEY (`producer_id`), | ||
KEY (`community_id`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_scalar` ( | ||
`scalar_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`trend_id` bigint(20) NOT NULL, | ||
`value` double, | ||
`producer_revision` varchar(255), | ||
`submit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
`user_id` bigint(20) NOT NULL DEFAULT '-1', | ||
`submission_id` bigint(20) NOT NULL DEFAULT '-1', | ||
`official` tinyint(4) NOT NULL DEFAULT '1', | ||
`build_results_url` text NOT NULL, | ||
`branch` varchar(255) NOT NULL DEFAULT '', | ||
`params` text, | ||
`extra_urls` text, | ||
PRIMARY KEY (`scalar_id`), | ||
KEY (`trend_id`), | ||
KEY (`submit_time`), | ||
KEY (`user_id`), | ||
KEY (`submission_id`), | ||
KEY (`branch`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_submission` ( | ||
`submission_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`producer_id` bigint(20) NOT NULL, | ||
`name` varchar(255) NOT NULL DEFAULT '', | ||
`uuid` varchar(255) NOT NULL DEFAULT '', | ||
`submit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY (`submission_id`), | ||
UNIQUE KEY (`uuid`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_scalar2item` ( | ||
`scalar_id` bigint(20) NOT NULL, | ||
`item_id` bigint(20) NOT NULL, | ||
`label` varchar(255) NOT NULL, | ||
KEY (`scalar_id`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_threshold_notification` ( | ||
`threshold_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`trend_id` bigint(20) NOT NULL, | ||
`value` double, | ||
`comparison` varchar(2), | ||
`action` varchar(80) NOT NULL, | ||
`recipient_id` bigint(20) NOT NULL, | ||
PRIMARY KEY (`threshold_id`), | ||
KEY (`trend_id`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_trend` ( | ||
`trend_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`producer_id` bigint(20) NOT NULL, | ||
`metric_name` varchar(255) NOT NULL, | ||
`display_name` varchar(255) NOT NULL, | ||
`unit` varchar(255) NOT NULL, | ||
`config_item_id` bigint(20), | ||
`test_dataset_id` bigint(20), | ||
`truth_dataset_id` bigint(20), | ||
`is_key_metric` boolean NOT NULL DEFAULT FALSE, | ||
PRIMARY KEY (`trend_id`), | ||
KEY (`producer_id`) | ||
) DEFAULT CHARSET=utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
-- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. | ||
|
||
-- PostgreSQL database for the tracker module, version 1.2.0 | ||
|
||
SET client_encoding = 'UTF8'; | ||
SET default_with_oids = FALSE; | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_producer" ( | ||
"producer_id" serial PRIMARY KEY, | ||
"community_id" bigint NOT NULL, | ||
"repository" character varying(255) NOT NULL, | ||
"executable_name" character varying(255) NOT NULL, | ||
"display_name" character varying(255) NOT NULL, | ||
"description" text NOT NULL, | ||
"revision_url" text NOT NULL | ||
); | ||
|
||
CREATE INDEX "tracker_producer_community_id" ON "tracker_producer" ("community_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_scalar" ( | ||
"scalar_id" serial PRIMARY KEY, | ||
"trend_id" bigint NOT NULL, | ||
"value" double precision, | ||
"producer_revision" character varying(255), | ||
"submit_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"user_id" bigint NOT NULL DEFAULT -1::bigint, | ||
"submission_id" bigint NOT NULL DEFAULT -1::bigint, | ||
"official" smallint NOT NULL DEFAULT 1::smallint, | ||
"build_results_url" text NOT NULL, | ||
"branch" character varying(255) NOT NULL DEFAULT ''::character varying, | ||
"params" text, | ||
"extra_urls" text | ||
); | ||
|
||
CREATE INDEX "tracker_scalar_trend_id" ON "tracker_scalar" ("trend_id"); | ||
CREATE INDEX "tracker_scalar_submit_time" ON "tracker_scalar" ("submit_time"); | ||
CREATE INDEX "tracker_scalar_idx_branch" ON "tracker_scalar" ("branch"); | ||
CREATE INDEX "tracker_scalar_idx_user_id" ON "tracker_scalar" ("user_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_submission" ( | ||
"submission_id" serial PRIMARY KEY, | ||
"producer_id" bigint, | ||
"name" character varying(255) NOT NULL DEFAULT ''::character varying, | ||
"uuid" character varying(255) NOT NULL DEFAULT ''::character varying, | ||
"submit_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
); | ||
CREATE UNIQUE INDEX "tracker_submission_uuid" ON "tracker_submission" ("uuid"); | ||
CREATE INDEX "tracker_submission_submit_time" ON "tracker_submission" ("submit_time"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_scalar2item" ( | ||
"id" serial PRIMARY KEY, | ||
"scalar_id" bigint NOT NULL, | ||
"item_id" bigint NOT NULL, | ||
"label" character varying(255) NOT NULL | ||
); | ||
|
||
CREATE INDEX "tracker_scalar2item_scalar_id" ON "tracker_scalar2item" ("scalar_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_threshold_notification" ( | ||
"threshold_id" serial PRIMARY KEY, | ||
"trend_id" bigint NOT NULL, | ||
"value" double precision, | ||
"comparison" character varying(2), | ||
"action" character varying(80) NOT NULL, | ||
"recipient_id" bigint NOT NULL | ||
); | ||
|
||
CREATE INDEX "tracker_threshold_notification_trend_id" ON "tracker_threshold_notification" ("trend_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_trend" ( | ||
"trend_id" serial PRIMARY KEY, | ||
"producer_id" bigint NOT NULL, | ||
"metric_name" character varying(255) NOT NULL, | ||
"display_name" character varying(255) NOT NULL, | ||
"unit" character varying(255) NOT NULL, | ||
"config_item_id" bigint, | ||
"test_dataset_id" bigint, | ||
"truth_dataset_id" bigint, | ||
is_key_metric boolean NOT NULL DEFAULT FALSE | ||
); | ||
|
||
CREATE INDEX "tracker_trend_producer_id" ON "tracker_trend" ("producer_id"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
-- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. | ||
|
||
-- SQLite database for the tracker module, version 1.2.0 | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_producer" ( | ||
"producer_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"community_id" INTEGER NOT NULL, | ||
"repository" TEXT NOT NULL, | ||
"executable_name" TEXT NOT NULL, | ||
"display_name" TEXT NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"revision_url" TEXT NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_producer_community_id_idx" ON "tracker_producer" ("community_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_scalar" ( | ||
"scalar_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"trend_id" INTEGER NOT NULL, | ||
"value" REAL, | ||
"producer_revision" TEXT, | ||
"submit_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"user_id" INTEGER NOT NULL DEFAULT -1, | ||
"submission_id" INTEGER NOT NULL DEFAULT -1, | ||
"official" INTEGER NOT NULL DEFAULT 1, | ||
"build_results_url" TEXT NOT NULL, | ||
"branch" TEXT NOT NULL DEFAULT '', | ||
"params" TEXT, | ||
"extra_urls" TEXT | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_scalar_trend_id_idx" ON "tracker_scalar" ("trend_id"); | ||
CREATE INDEX IF NOT EXISTS "tracker_scalar_submit_time_idx" ON "tracker_scalar" ("submit_time"); | ||
CREATE INDEX IF NOT EXISTS "tracker_scalar_branch_idx" ON "tracker_scalar" ("branch"); | ||
CREATE INDEX IF NOT EXISTS "tracker_scalar_user_id_idx" ON "tracker_scalar" ("user_id"); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS "tracker_submission" ( | ||
"submission_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"producer_id" INTEGER NOT NULL, | ||
"name" TEXT NOT NULL DEFAULT '', | ||
"uuid" TEXT NOT NULL DEFAULT '', | ||
"submit_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
); | ||
CREATE UNIQUE INDEX IF NOT EXISTS "tracker_submission_uuid_idx" ON "tracker_submission" ("uuid"); | ||
CREATE INDEX IF NOT EXISTS "tracker_submission_submit_time_idx" ON "tracker_submission" ("submit_time"); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS "tracker_scalar2item" ( | ||
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"scalar_id" INTEGER NOT NULL, | ||
"item_id" INTEGER NOT NULL, | ||
"label" TEXT NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_scalar2item_scalar_id_idx" ON "tracker_scalar2item" ("scalar_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_threshold_notification" ( | ||
"threshold_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"trend_id" INTEGER NOT NULL, | ||
"value" REAL, | ||
"comparison" TEXT, | ||
"action" TEXT NOT NULL, | ||
"recipient_id" INTEGER NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_threshold_notification_trend_id_idx" ON "tracker_threshold_notification" ("trend_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_trend" ( | ||
"trend_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"producer_id" INTEGER NOT NULL, | ||
"metric_name" TEXT NOT NULL, | ||
"display_name" TEXT NOT NULL, | ||
"unit" TEXT NOT NULL, | ||
"config_item_id" INTEGER, | ||
"test_dataset_id" INTEGER, | ||
"truth_dataset_id" INTEGER, | ||
"is_key_metric" BOOLEAN NOT NULL DEFAULT FALSE | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_trend_producer_id_idx" ON "tracker_trend" ("producer_id"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters