VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/testmanager/db/TestManagerDatabaseForeignKeyErHacks2.pgsql@ 83398

Last change on this file since 83398 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1-- $Id: TestManagerDatabaseForeignKeyErHacks2.pgsql 82968 2020-02-04 10:35:17Z vboxsync $
2--- @file
3-- VBox Test Manager Database Addendum that adds non-unique foreign keys to Users.
4--
5-- This is for getting better visualization in reverse engeering ER tools,
6-- it is not for production databases.
7--
8
9--
10-- Copyright (C) 2012-2020 Oracle Corporation
11--
12-- This file is part of VirtualBox Open Source Edition (OSE), as
13-- available from http://www.virtualbox.org. This file is free software;
14-- you can redistribute it and/or modify it under the terms of the GNU
15-- General Public License (GPL) as published by the Free Software
16-- Foundation, in version 2 as it comes in the "COPYING" file of the
17-- VirtualBox OSE distribution. VirtualBox OSE is distributed in the
18-- hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19--
20-- The contents of this file may alternatively be used under the terms
21-- of the Common Development and Distribution License Version 1.0
22-- (CDDL) only, as it comes in the "COPYING.CDDL" file of the
23-- VirtualBox OSE distribution, in which case the provisions of the
24-- CDDL are applicable instead of those of the GPL.
25--
26-- You may elect to license modified versions of this file under the
27-- terms and conditions of either the GPL or the CDDL or both.
28--
29
30\set ON_ERROR_STOP 1
31\connect testmanager
32
33ALTER TABLE GlobalResources
34 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
35ALTER TABLE BuildSources
36 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
37ALTER TABLE RequirementSets
38 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsCreated) REFERENCES Users(uid, tsExpire) MATCH FULL;
39ALTER TABLE TestCases
40 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
41ALTER TABLE TestCaseArgs
42 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
43ALTER TABLE TestcaseDeps
44 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
45ALTER TABLE TestCaseGlobalRsrcDeps
46 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
47ALTER TABLE TestGroups
48 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
49ALTER TABLE TestGroupMembers
50 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
51ALTER TABLE SchedGroups
52 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH SIMPLE;
53ALTER TABLE SchedGroupMembers
54 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
55ALTER TABLE TestBoxes
56 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
57ALTER TABLE FailureCategories
58 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
59ALTER TABLE FailureReasons
60 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
61ALTER TABLE TestResultFailures
62 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
63ALTER TABLE BuildBlacklist
64 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsExpire) REFERENCES Users(uid, tsExpire) MATCH FULL;
65ALTER TABLE Builds
66 ADD CONSTRAINT non_unique_fk9 FOREIGN KEY (uidAuthor, tsCreated) REFERENCES Users(uid, tsExpire) MATCH FULL;
67
Note: See TracBrowser for help on using the repository browser.

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