diff options
Diffstat (limited to 'src/hydrilla/proxy/tables.sql')
-rw-r--r-- | src/hydrilla/proxy/tables.sql | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/hydrilla/proxy/tables.sql b/src/hydrilla/proxy/tables.sql index 25493d3..2a6cac6 100644 --- a/src/hydrilla/proxy/tables.sql +++ b/src/hydrilla/proxy/tables.sql @@ -121,15 +121,11 @@ CREATE TABLE mapping_statuses( -- "enabled" determines whether mapping's status is ENABLED, -- DISABLED or NO_MARK. enabled CHAR(1) NOT NULL, - enabled_version_id INTEGER NULL, -- "frozen" determines whether an enabled mapping is to be kept in its -- EXACT_VERSION, is to be updated only with versions from the same -- REPOSITORY or is NOT_FROZEN at all. frozen CHAR(1) NULL, - CHECK (NOT (enabled = 'D' AND enabled_version_id IS NOT NULL)), - CHECK (NOT (enabled = 'E' AND enabled_version_id IS NULL)), - CHECK ((frozen IS NULL) = (enabled != 'E')), CHECK (frozen IS NULL OR frozen in ('E', 'R', 'N')) ); @@ -143,8 +139,6 @@ CREATE TABLE item_versions( definition TEXT NOT NULL, UNIQUE (item_id, version, repo_iteration_id), - -- Allow foreign key from "mapping_statuses". - UNIQUE (item_version_id, item_id), FOREIGN KEY (item_id) REFERENCES items (item_id), @@ -226,6 +220,7 @@ CREATE TABLE file_uses( CHECK (type IN ('L', 'W')), UNIQUE(item_version_id, type, idx), + UNIQUE(item_version_id, type, name), FOREIGN KEY (item_version_id) REFERENCES item_versions(item_version_id) |