From 3c0db27f773f99b325dcc7c6a7c7d1c5bbfb69a9 Mon Sep 17 00:00:00 2001
From: Yorhel <git@yorhel.nl>
Date: Sat, 8 Aug 2009 14:30:29 +0200
Subject: Convert old category relations to tags and remove vn_categories

This will currently generate a 500 error for VN pages, because they
still try to look something up in the vn_categories table. Will fix that
soon.

Obviously, this conversion script only works on the actual VNDB
database, if you run your own VNDB you can safely ignore the INSERT
error when executing update_2.6.sql.
---
 util/dump.sql | 9 ---------
 1 file changed, 9 deletions(-)

(limited to 'util/dump.sql')

diff --git a/util/dump.sql b/util/dump.sql
index 3a470102..acd639d5 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -287,14 +287,6 @@ CREATE TABLE vn_anime (
   PRIMARY KEY(vid, aid)
 );
 
--- vn_categories
-CREATE TABLE vn_categories (
-  vid integer NOT NULL DEFAULT 0,
-  cat character(3) NOT NULL DEFAULT '',
-  lvl smallint NOT NULL DEFAULT 3,
-  PRIMARY KEY(vid, cat)
-);
-
 -- vn_relations
 CREATE TABLE vn_relations (
   vid1 integer NOT NULL DEFAULT 0,
@@ -390,7 +382,6 @@ ALTER TABLE vn                 ADD FOREIGN KEY (latest)    REFERENCES vn_rev
 ALTER TABLE vn                 ADD FOREIGN KEY (rgraph)    REFERENCES relgraph      (id);
 ALTER TABLE vn_anime           ADD FOREIGN KEY (aid)       REFERENCES anime         (id);
 ALTER TABLE vn_anime           ADD FOREIGN KEY (vid)       REFERENCES vn_rev        (id);
-ALTER TABLE vn_categories      ADD FOREIGN KEY (vid)       REFERENCES vn_rev        (id);
 ALTER TABLE vn_relations       ADD FOREIGN KEY (vid1)      REFERENCES vn_rev        (id);
 ALTER TABLE vn_relations       ADD FOREIGN KEY (vid2)      REFERENCES vn            (id);
 ALTER TABLE vn_rev             ADD FOREIGN KEY (id)        REFERENCES changes       (id);
-- 
cgit v1.2.3

