summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-02-22 11:16:59 +0100
committerYorhel <git@yorhel.nl>2011-02-22 11:41:08 +0100
commit1c74dfdf44f080bc4a30be6303bf2845c2f5f7b0 (patch)
treee5eebe46c7f87939df5b6ff880a4e05a53eb2e81 /util
parent54d983f9090f63136df11ff15861c17f7e96508a (diff)
chardb: +image quality, -other blood type, typo fix, +gender icons
Diffstat (limited to 'util')
-rw-r--r--util/sql/func.sql4
-rw-r--r--util/updates/update_2.19.sql8
2 files changed, 6 insertions, 6 deletions
diff --git a/util/sql/func.sql b/util/sql/func.sql
index c655159a..6ae0312b 100644
--- a/util/sql/func.sql
+++ b/util/sql/func.sql
@@ -424,7 +424,7 @@ BEGIN
INSERT INTO edit_char DEFAULT VALUES;
-- load revision
ELSE
- INSERT INTO edit_char SELECT name, original, alias, image, "desc", s_bust, s_waist, s_hip, b_month, b_day, height, weight, bloodt, gender FROM chars_rev WHERE id = hid;
+ INSERT INTO edit_char SELECT name, original, alias, image, "desc", gender, s_bust, s_waist, s_hip, b_month, b_day, height, weight, bloodt FROM chars_rev WHERE id = hid;
INSERT INTO edit_char_traits SELECT tid, spoil FROM chars_traits WHERE cid = hid;
END IF;
END;
@@ -440,7 +440,7 @@ BEGIN
RAISE 'edit_char must have exactly one row!';
END IF;
SELECT INTO r * FROM edit_commit();
- INSERT INTO chars_rev SELECT r.cid, r.iid, name, original, alias, image, "desc", s_bust, s_waist, s_hip, b_month, b_day, height, weight, bloodt, gender FROM edit_char;
+ INSERT INTO chars_rev SELECT r.cid, r.iid, name, original, alias, image, "desc", gender, s_bust, s_waist, s_hip, b_month, b_day, height, weight, bloodt FROM edit_char;
INSERT INTO chars_traits SELECT r.cid, tid, spoil FROM edit_char_traits;
UPDATE chars SET latest = r.cid WHERE id = r.iid;
RETURN r;
diff --git a/util/updates/update_2.19.sql b/util/updates/update_2.19.sql
index 02878118..c8fb1119 100644
--- a/util/updates/update_2.19.sql
+++ b/util/updates/update_2.19.sql
@@ -31,7 +31,7 @@ ALTER TABLE tags RENAME c_vns TO c_items;
-- character database -> chars
CREATE TYPE char_role AS ENUM ('main', 'primary', 'side', 'appears');
-CREATE TYPE blood_type AS ENUM ('unknown', 'a', 'b', 'ab', 'o', 'other');
+CREATE TYPE blood_type AS ENUM ('unknown', 'a', 'b', 'ab', 'o');
CREATE TYPE gender AS ENUM ('unknown', 'm', 'f', 'b');
CREATE TABLE chars (
@@ -49,6 +49,7 @@ CREATE TABLE chars_rev (
alias varchar(500) NOT NULL DEFAULT '',
image integer NOT NULL DEFAULT 0,
"desc" text NOT NULL DEFAULT '',
+ gender gender NOT NULL DEFAULT 'unknown',
s_bust smallint NOT NULL DEFAULT 0,
s_waist smallint NOT NULL DEFAULT 0,
s_hip smallint NOT NULL DEFAULT 0,
@@ -57,7 +58,6 @@ CREATE TABLE chars_rev (
height smallint NOT NULL DEFAULT 0,
weight smallint NOT NULL DEFAULT 0,
bloodt blood_type NOT NULL DEFAULT 'unknown',
- gender gender NOT NULL DEFAULT 'unknown',
main integer REFERENCES chars (id),
main_spoil boolean NOT NULL DEFAULT false
);
@@ -178,13 +178,13 @@ INSERT INTO traits_parents (trait, parent) VALUES
-- phorni!
SELECT edit_char_init(null);
UPDATE edit_revision SET comments = 'New test entry', requester = 2, ip = '0.0.0.0';
-UPDATE edit_char SET name = 'Phorni', original = 'フォーニ', "desc" = 'Sprite of Music', height = 14;
+UPDATE edit_char SET name = 'Phorni', original = 'フォーニ', "desc" = 'Sprite of Music', height = 14, gender = 'f';
SELECT edit_char_commit();
-- saya (incorrect test data)
SELECT edit_char_init(null);
UPDATE edit_revision SET comments = '2nd test entry', requester = 2, ip = '0.0.0.0';
-UPDATE edit_char SET name = 'Saya', original = '沙耶', "desc" = 'There is more than meets the eye!', alias = 'Cute monster', height = 140, weight = 52, s_bust = 41, s_waist = 38, s_hip = 40, b_month = 3, b_day = 15, bloodt = 'a';
+UPDATE edit_char SET name = 'Saya', original = '沙耶', "desc" = 'There is more than meets the eye!', alias = 'Cute monster', height = 140, weight = 52, s_bust = 41, s_waist = 38, s_hip = 40, b_month = 3, b_day = 15, bloodt = 'a', gender = 'f';
INSERT INTO edit_char_traits VALUES (4, 0), (12, 2), (22, 0), (27, 0), (18, 1);
SELECT edit_char_commit();