path: root/util
diff options
authorYorhel <>2011-02-04 19:26:36 +0100
committerYorhel <>2011-02-04 19:26:36 +0100
commit80d22665f3f4a99f60c4b808bb5dc97a1f8f6830 (patch)
treed28444b0d592bced999e3e424e1b71ab248796c7 /util
parent9b8d7c719a722007839ec501b42070c2291f9e04 (diff)
Added category field to tags (content/ero/technical)
Not very useful at the moment, but will be used to improve several other things.
Diffstat (limited to 'util')
3 files changed, 8 insertions, 1 deletions
diff --git a/util/sql/all.sql b/util/sql/all.sql
index 09a6d214..0a6d1037 100644
--- a/util/sql/all.sql
+++ b/util/sql/all.sql
@@ -13,6 +13,7 @@ CREATE TYPE notification_ltype AS ENUM ('v', 'r', 'p', 't');
CREATE TYPE prefs_key AS ENUM ('l10n', 'skin', 'customcss', 'filter_vn', 'filter_release', 'show_nsfw', 'hide_list', 'notify_nodbedit', 'notify_announce');
CREATE TYPE producer_relation AS ENUM ('old', 'new', 'sub', 'par', 'imp', 'ipa', 'spa', 'ori');
CREATE TYPE release_type AS ENUM ('complete', 'partial', 'trial');
+CREATE TYPE tag_category AS ENUM('cont', 'ero', 'tech');
CREATE TYPE vn_relation AS ENUM ('seq', 'preq', 'set', 'alt', 'char', 'side', 'par', 'ser', 'fan', 'orig');
diff --git a/util/sql/schema.sql b/util/sql/schema.sql
index 2a3a394a..dd2b2ffd 100644
--- a/util/sql/schema.sql
+++ b/util/sql/schema.sql
@@ -193,7 +193,8 @@ CREATE TABLE tags (
added timestamptz NOT NULL DEFAULT NOW(),
state smallint NOT NULL DEFAULT 0,
c_vns integer NOT NULL DEFAULT 0,
- addedby integer NOT NULL DEFAULT 0
+ addedby integer NOT NULL DEFAULT 0,
+ cat tag_category NOT NULL DEFAULT 'cont'
-- tags_aliases
diff --git a/util/updates/update_2.18.sql b/util/updates/update_2.18.sql
new file mode 100644
index 00000000..c4cfe84f
--- /dev/null
+++ b/util/updates/update_2.18.sql
@@ -0,0 +1,5 @@
+CREATE TYPE tag_category AS ENUM('cont', 'ero', 'tech');
+ALTER TABLE tags ADD COLUMN cat tag_category NOT NULL DEFAULT 'cont';