Changeset 61255 in vbox for trunk/src/VBox/ValidationKit/testmanager/db
- Timestamp:
- May 28, 2016 3:52:35 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 107547
- Location:
- trunk/src/VBox/ValidationKit/testmanager/db
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseInit.pgsql
r56789 r61255 402 402 --- Number of testboxes required (gang scheduling). 403 403 cGangMembers SMALLINT DEFAULT 1 NOT NULL CHECK (cGangMembers > 0 AND cGangMembers < 1024), 404 --- Optional variation sub-name. 405 sSubName TEXT DEFAULT NULL, 404 406 405 407 --- The arguments are part of the primary key for several reasons. … … 957 959 -- Non-unique foreign key: Users(uid) 958 960 uidAuthor INTEGER NOT NULL, 961 --- The testsest this result is a part of. 962 -- This is mainly an aid for bypassing the enormous TestResults table. 963 -- Note! This is a foreign key, but we have to add it after TestSets has 964 -- been created, see further down. 965 idTestSet INTEGER NOT NULL, 959 966 960 967 --- The suggested failure reason. … … 966 973 PRIMARY KEY (idTestResult, tsExpire) 967 974 ); 968 975 CREATE INDEX TestResultFailureIdx ON TestResultFailures (idTestSet, tsExpire DESC, tsEffective ASC); 976 CREATE INDEX TestResultFailureIdx2 ON TestResultFailures (idTestResult, tsExpire DESC, tsEffective ASC); 977 CREATE INDEX TestResultFailureIdx3 ON TestResultFailures (idFailureReason, idTestResult, tsExpire DESC, tsEffective ASC); 969 978 970 979 … … 1309 1318 OR (cErrors = 0 AND enmStatus IN ('running'::TestStatus_T, 'success'::TestStatus_T, 1310 1319 'skipped'::TestStatus_T, 'aborted'::TestStatus_T, 'bad-testbox'::TestStatus_T)) 1311 ) 1320 ), 1321 -- The following is for the TestResultFailures foreign key. 1322 -- Note! This was added with the name TestResults_idTestResult_idTestSet_key in the tmdb-r16 update script. 1323 UNIQUE (idTestResult, idTestSet) 1312 1324 ); 1313 1325 … … 1318 1330 CREATE INDEX TestResultsNameIdx2 ON TestResults (idTestResult, idStrName); 1319 1331 1320 ALTER TABLE TestResultFailures 1321 ADD CONSTRAINT idTestResultFk FOREIGN KEY (idTestResult) REFERENCES TestResults(idTestResult) MATCH FULL;1332 ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey 1333 FOREIGN KEY (idTestResult, idTestSet) REFERENCES TestResults(idTestResult, idTestSet) MATCH FULL; 1322 1334 1323 1335 … … 1557 1569 ALTER TABLE TestResults ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; 1558 1570 ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; 1571 ALTER TABLE TestResultFailures ADD CONSTRAINT idTestSetFk FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL; 1559 1572 1560 1573
Note:
See TracChangeset
for help on using the changeset viewer.