VirtualBox

Ignore:
Timestamp:
May 28, 2016 3:52:35 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
107547
Message:

testmanager: two database changes.

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  
    402402    --- Number of testboxes required (gang scheduling).
    403403    cGangMembers        SMALLINT    DEFAULT 1  NOT NULL  CHECK (cGangMembers > 0 AND cGangMembers < 1024),
     404    --- Optional variation sub-name.
     405    sSubName            TEXT        DEFAULT NULL,
    404406
    405407    --- The arguments are part of the primary key for several reasons.
     
    957959    -- Non-unique foreign key: Users(uid)
    958960    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,
    959966
    960967    --- The suggested failure reason.
     
    966973    PRIMARY KEY (idTestResult, tsExpire)
    967974);
    968 
     975CREATE INDEX TestResultFailureIdx  ON TestResultFailures (idTestSet, tsExpire DESC, tsEffective ASC);
     976CREATE INDEX TestResultFailureIdx2 ON TestResultFailures (idTestResult, tsExpire DESC, tsEffective ASC);
     977CREATE INDEX TestResultFailureIdx3 ON TestResultFailures (idFailureReason, idTestResult, tsExpire DESC, tsEffective ASC);
    969978
    970979
     
    13091318               OR (cErrors = 0 AND enmStatus IN ('running'::TestStatus_T, 'success'::TestStatus_T,
    13101319                                                 '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)
    13121324);
    13131325
     
    13181330CREATE INDEX TestResultsNameIdx2 ON TestResults (idTestResult, idStrName);
    13191331
    1320 ALTER TABLE TestResultFailures
    1321     ADD CONSTRAINT idTestResultFk FOREIGN KEY (idTestResult) REFERENCES TestResults(idTestResult) MATCH FULL;
     1332ALTER TABLE TestResultFailures ADD CONSTRAINT TestResultFailures_idTestResult_idTestSet_fkey
     1333    FOREIGN KEY (idTestResult, idTestSet) REFERENCES TestResults(idTestResult, idTestSet) MATCH FULL;
    13221334
    13231335
     
    15571569ALTER TABLE TestResults      ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;
    15581570ALTER TABLE TestResultValues ADD FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;
     1571ALTER TABLE TestResultFailures ADD CONSTRAINT idTestSetFk FOREIGN KEY (idTestSet) REFERENCES TestSets(idTestSet) MATCH FULL;
    15591572
    15601573
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette