summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-10-25 10:15:14 +0100
committerYorhel <git@yorhel.nl>2015-10-25 10:15:14 +0100
commit5873b30d78f2883ba8aa7fcc9e5ce3e10b9605ae (patch)
tree5141375087866fa75a34be22b6d0c1775aa37a44 /util
parent799ae5fd9460448c98423d92b69428fc4be05dd1 (diff)
Staff: Add error msg when removing used alias + fix bug in alias editing
The new database schema doesn't allow an alias to be removed when it is still linked to a VN.
Diffstat (limited to 'util')
-rw-r--r--util/sql/schema.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql
index 960b1978..9f78cf51 100644
--- a/util/sql/schema.sql
+++ b/util/sql/schema.sql
@@ -387,7 +387,7 @@ CREATE TABLE staff ( -- dbentry_type=s
id SERIAL PRIMARY KEY,
locked boolean NOT NULL DEFAULT FALSE,
hidden boolean NOT NULL DEFAULT FALSE,
- aid integer NOT NULL, -- staff_alias.aid
+ aid integer NOT NULL DEFAULT 0, -- staff_alias.aid
gender gender NOT NULL DEFAULT 'unknown',
lang language NOT NULL DEFAULT 'ja',
"desc" text NOT NULL DEFAULT '',
@@ -400,7 +400,7 @@ CREATE TABLE staff ( -- dbentry_type=s
-- staff_hist
CREATE TABLE staff_hist (
chid integer NOT NULL PRIMARY KEY,
- aid integer NOT NULL, -- Can't refer to staff_alias.id, because the alias might have been deleted
+ aid integer NOT NULL DEFAULT 0, -- Can't refer to staff_alias.id, because the alias might have been deleted
gender gender NOT NULL DEFAULT 'unknown',
lang language NOT NULL DEFAULT 'ja',
"desc" text NOT NULL DEFAULT '',