summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-09 11:45:32 +0200
committerYorhel <git@yorhel.nl>2009-10-09 11:47:54 +0200
commitd43ae33a587743fc0916930e0a39f561f3174a69 (patch)
treedb92a9126357b5cfc826a9506cfe89a6da98bda2 /util
parent9b379e376cbafc8408d8ff3318a39ca2631f510a (diff)
Added producer role (developer/publisher) to DB and release editor
They aren't displayed on the site yet, though.
Diffstat (limited to 'util')
-rw-r--r--util/dump.sql3
-rw-r--r--util/updates/update_2.8.sql5
2 files changed, 8 insertions, 0 deletions
diff --git a/util/dump.sql b/util/dump.sql
index b43d8c62..10d13b9d 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -103,6 +103,9 @@ CREATE TABLE releases_platforms (
CREATE TABLE releases_producers (
rid integer NOT NULL,
pid integer NOT NULL,
+ developer boolean NOT NULL DEFAULT FALSE,
+ publisher boolean NOT NULL DEFAULT TRUE,
+ CHECK(developer OR publisher),
PRIMARY KEY(pid, rid)
);
diff --git a/util/updates/update_2.8.sql b/util/updates/update_2.8.sql
index df5221ee..2993467c 100644
--- a/util/updates/update_2.8.sql
+++ b/util/updates/update_2.8.sql
@@ -54,3 +54,8 @@ ALTER TABLE releases_media ALTER COLUMN medium DROP DEFAULT;
ALTER TABLE releases_media ALTER COLUMN medium TYPE medium USING TRIM(both ' ' from medium)::medium;
+-- Differentiate between publishers and developers
+ALTER TABLE releases_producers ADD COLUMN developer boolean NOT NULL DEFAULT FALSE;
+ALTER TABLE releases_producers ADD COLUMN publisher boolean NOT NULL DEFAULT TRUE;
+ALTER TABLE releases_producers ADD CHECK(developer OR publisher);
+