Changeset 61466 in vbox for trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql
- Timestamp:
- Jun 4, 2016 5:12:39 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/db/tmdb-r18-testresultfiles-1-testresultmsgs-1.pgsql
r61463 r61466 55 55 idTestResultFile INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultFileId'), 56 56 --- The test result it was reported within. 57 idTestResult INTEGER REFERENCES TestResults(idTestResult)NOT NULL,57 idTestResult INTEGER NOT NULL, 58 58 --- The test set this file is a part of (for avoiding joining thru TestResults). 59 idTestSet INTEGER REFERENCES TestSets(idTestSet)NOT NULL,59 idTestSet INTEGER NOT NULL, 60 60 --- Creation time stamp. 61 61 tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, … … 65 65 -- loading the files. Tests trying to use other characters will fail. 66 66 -- Valid character regular expession: '^[a-zA-Z0-9_-(){}#@+,.=]*$' 67 idStrFile INTEGER REFERENCES TestResultStrTab(idStr)NOT NULL,67 idStrFile INTEGER NOT NULL, 68 68 --- The description. 69 idStrDescription INTEGER REFERENCES TestResultStrTab(idStr)NOT NULL,69 idStrDescription INTEGER NOT NULL, 70 70 --- The kind of file. 71 71 -- For instance: 'log/release/vm', … … 73 73 -- 'screencapture/failure', 74 74 -- 'xmllog/somestuff' 75 idStrKind INTEGER REFERENCES TestResultStrTab(idStr)NOT NULL,75 idStrKind INTEGER NOT NULL, 76 76 --- The mime type for the file. 77 77 -- For instance: 'text/plain', … … 79 79 -- 'video/webm', 80 80 -- 'text/xml' 81 idStrMime INTEGER REFERENCES TestResultStrTab(idStr)NOT NULL81 idStrMime INTEGER NOT NULL 82 82 ); 83 83 … … 91 91 92 92 -- Add new indexes. 93 CREATE INDEX TestResultFilesIdx ON TestResultFiles(idTestResult);93 CREATE INDEX TestResultFilesIdx ON TestResultFiles(idTestResult); 94 94 CREATE INDEX TestResultFilesIdx2 ON TestResultFiles(idTestSet, tsCreated DESC); 95 96 -- Restore foreign keys. 97 ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idTestResult_fkey FOREIGN KEY(idTestResult) REFERENCES TestResults(idTestResult); 98 ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idTestSet_fkey FOREIGN KEY(idTestSet) REFERENCES TestSets(idTestSet); 99 ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idStrFile_fkey FOREIGN KEY(idStrFile) REFERENCES TestResultStrTab(idStr); 100 ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idStrDescription_fkey FOREIGN KEY(idStrDescription) REFERENCES TestResultStrTab(idStr); 101 ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idStrKind_fkey FOREIGN KEY(idStrKind) REFERENCES TestResultStrTab(idStr); 102 ALTER TABLE TestResultFiles ADD CONSTRAINT TestResultFiles_idStrMime_fkey FOREIGN KEY(idStrMime) REFERENCES TestResultStrTab(idStr); 95 103 96 104 \d TestResultFiles; … … 114 122 idTestResultMsg INTEGER PRIMARY KEY DEFAULT NEXTVAL('TestResultMsgIdSeq'), 115 123 --- The test result it was reported within. 116 idTestResult INTEGER REFERENCES TestResults(idTestResult)NOT NULL,124 idTestResult INTEGER NOT NULL, 117 125 --- The test set this file is a part of (for avoiding joining thru TestResults). 118 idTestSet INTEGER REFERENCES TestSets(idTestSet)NOT NULL,126 idTestSet INTEGER NOT NULL, 119 127 --- Creation time stamp. 120 128 tsCreated TIMESTAMP WITH TIME ZONE DEFAULT current_timestamp NOT NULL, 121 129 --- The message string. 122 idStrMsg INTEGER REFERENCES TestResultStrTab(idStr)NOT NULL,130 idStrMsg INTEGER NOT NULL, 123 131 --- The message level. 124 132 enmLevel TestResultMsgLevel_T NOT NULL … … 135 143 CREATE INDEX TestResultMsgsIdx2 ON TestResultMsgs(idTestSet, tsCreated DESC); 136 144 145 -- Restore foreign keys. 146 ALTER TABLE TestResultMsgs ADD CONSTRAINT TestResultMsgs_idTestResult_fkey FOREIGN KEY(idTestResult) REFERENCES TestResults(idTestResult); 147 ALTER TABLE TestResultMsgs ADD CONSTRAINT TestResultMsgs_idTestSet_fkey FOREIGN KEY(idTestSet) REFERENCES TestSets(idTestSet); 148 ALTER TABLE TestResultMsgs ADD CONSTRAINT TestResultMsgs_idStrMsg_fkey FOREIGN KEY(idStrMsg) REFERENCES TestResultStrTab(idStr); 149 150 137 151 \d TestResultMsgs; 138 152
Note:
See TracChangeset
for help on using the changeset viewer.