summaryrefslogtreecommitdiff
path: root/util/updates
diff options
context:
space:
mode:
Diffstat (limited to 'util/updates')
-rw-r--r--util/updates/update_2.19.sql26
1 files changed, 26 insertions, 0 deletions
diff --git a/util/updates/update_2.19.sql b/util/updates/update_2.19.sql
new file mode 100644
index 00000000..9819f685
--- /dev/null
+++ b/util/updates/update_2.19.sql
@@ -0,0 +1,26 @@
+-- These changes have not been synced with the /util/sql/ files yet.
+
+
+-- character database -> traits
+
+CREATE TABLE traits (
+ id SERIAL PRIMARY KEY,
+ name varchar(250) NOT NULL UNIQUE,
+ description text NOT NULL DEFAULT '',
+ meta boolean NOT NULL DEFAULT false,
+ added timestamptz NOT NULL DEFAULT NOW(),
+ state smallint NOT NULL DEFAULT 0,
+ addedby integer NOT NULL DEFAULT 0 REFERENCES users (id)
+);
+
+CREATE TABLE traits_aliases (
+ alias varchar(250) NOT NULL PRIMARY KEY,
+ trait integer NOT NULL REFERENCES traits (id)
+);
+
+CREATE TABLE traits_parents (
+ trait integer NOT NULL REFERENCES traits (id),
+ parent integer NOT NULL REFERENCES traits (id),
+ PRIMARY KEY(trait, parent)
+);
+