summaryrefslogtreecommitdiff
path: root/util/updates
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-21 11:30:24 +0200
committerYorhel <git@yorhel.nl>2009-10-21 11:33:46 +0200
commit06a2e823c738a622625dce599fa19580714834a5 (patch)
treebfa0da620c11812b1289543127567f0445b6e18b /util/updates
parent815ed4023dea8c3a4168bc6826a7e9515631dab8 (diff)
Started on the producer relations
The current list of relations isn't final yet, may be changed later on. Quite a bit of this code has been copied from the VN relations... need to find a way to use prober code reuse here. TODO: - Nice relation editor interface - Display relations in revision browser - Display relations on producer pages - Generate relation graphs - Sync update_2.8.sql into dump.sql
Diffstat (limited to 'util/updates')
-rw-r--r--util/updates/update_2.8.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/updates/update_2.8.sql b/util/updates/update_2.8.sql
index 54367c9b..1775958c 100644
--- a/util/updates/update_2.8.sql
+++ b/util/updates/update_2.8.sql
@@ -33,6 +33,22 @@ ALTER TABLE vn_relations ALTER COLUMN relation TYPE vn_relation USING
END;
+-- producer relations
+-- old -> Formerly
+-- new -> Succeeded by
+-- par -> Parent producer
+-- sub -> Subsidairy
+-- imp -> Imprint
+-- ipa -> Parent brand
+CREATE TYPE producer_relation AS ENUM ('old', 'new', 'par', 'sub', 'imp', 'ipa');
+CREATE TABLE producers_relations (
+ pid1 integer NOT NULL REFERENCES producers_rev (id),
+ pid2 integer NOT NULL REFERENCES producers (id),
+ relation producer_relation NOT NULL,
+ PRIMARY KEY(pid1, pid2)
+);
+
+
-- Anime types stored as enum
CREATE TYPE anime_type AS ENUM ('tv', 'ova', 'mov', 'oth', 'web', 'spe', 'mv');
ALTER TABLE anime ALTER COLUMN type TYPE anime_type USING