summaryrefslogtreecommitdiff
path: root/util/dump.sql
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-12 09:34:06 +0200
committerYorhel <git@yorhel.nl>2009-10-12 09:34:06 +0200
commit69d8738688ebb72707fe377b7ce7c717407aea96 (patch)
tree339e1b0cfcb860f152ef46a2a30638a053335370 /util/dump.sql
parent0c5a9606dd9047522c4357e36e5fe9081943b947 (diff)
SQL: Converted changes.type to an ENUM
This is a very important column in a very important table, I hope I didn't forget to update a piece of code somewhere...
Diffstat (limited to 'util/dump.sql')
-rw-r--r--util/dump.sql9
1 files changed, 5 insertions, 4 deletions
diff --git a/util/dump.sql b/util/dump.sql
index c952c162..8a8d2c61 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -5,9 +5,10 @@ CREATE LANGUAGE plpgsql;
-- data types
-CREATE TYPE anime_type AS ENUM ('tv', 'ova', 'mov', 'oth', 'web', 'spe', 'mv');
-CREATE TYPE medium AS ENUM ('cd', 'dvd', 'gdr', 'blr', 'flp', 'mrt', 'mem', 'umd', 'nod', 'in', 'otc');
-CREATE TYPE vn_relation AS ENUM ('seq', 'preq', 'set', 'alt', 'char', 'side', 'par', 'ser', 'fan', 'orig');
+CREATE TYPE anime_type AS ENUM ('tv', 'ova', 'mov', 'oth', 'web', 'spe', 'mv');
+CREATE TYPE dbentry_type AS ENUM ('v', 'r', 'p');
+CREATE TYPE medium AS ENUM ('cd', 'dvd', 'gdr', 'blr', 'flp', 'mrt', 'mem', 'umd', 'nod', 'in', 'otc');
+CREATE TYPE vn_relation AS ENUM ('seq', 'preq', 'set', 'alt', 'char', 'side', 'par', 'ser', 'fan', 'orig');
-----------------------------------------
@@ -30,7 +31,7 @@ CREATE TABLE anime (
-- changes
CREATE TABLE changes (
id SERIAL NOT NULL PRIMARY KEY,
- type smallint NOT NULL DEFAULT 0,
+ type dbentry_type NOT NULL,
rev integer NOT NULL DEFAULT 1,
added timestamptz NOT NULL DEFAULT NOW(),
requester integer NOT NULL DEFAULT 0,