summaryrefslogtreecommitdiff
path: root/util/dump.sql
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-08-20 10:13:48 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-08-20 10:13:48 +0000
commit3dc8780c15985ff86699addff1f4dbe43c6be19a (patch)
treecd1eda194c47776071c32318f908f46b69dd9b20 /util/dump.sql
parentcefb812260f70ba7976723b175b632c24888b877 (diff)
Another internal database change: changes.causedby accepts NULL values and properly references changes.id
git-svn-id: svn://vndb.org/vndb@99 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'util/dump.sql')
-rw-r--r--util/dump.sql3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/dump.sql b/util/dump.sql
index abb04935..cca3eaee 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -38,7 +38,7 @@ CREATE TABLE changes (
requester integer NOT NULL DEFAULT 0,
ip inet NOT NULL DEFAULT '0.0.0.0',
comments text NOT NULL DEFAULT '',
- causedby integer NOT NULL DEFAULT 0
+ causedby integer
);
-- producers
@@ -275,6 +275,7 @@ CREATE TABLE wlists (
ALTER TABLE changes ADD FOREIGN KEY (requester) REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE changes ADD FOREIGN KEY (causedby) REFERENCES changes (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE producers ADD FOREIGN KEY (latest) REFERENCES producers_rev (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE producers_rev ADD FOREIGN KEY (id) REFERENCES changes (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE producers_rev ADD FOREIGN KEY (pid) REFERENCES producers (id) DEFERRABLE INITIALLY DEFERRED;