diff options
author | Yorhel <git@yorhel.nl> | 2009-01-25 12:30:50 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-01-25 12:30:50 +0100 |
commit | e1835977fea7be42b702275ac88e69921d82777d (patch) | |
tree | 54d1ed5ef562a1672cea66975d90ce27864c094c /util | |
parent | 63c5fe06d0d4bd0c07f50c39fc26170b2bcc7096 (diff) |
Random quote feature
Diffstat (limited to 'util')
-rwxr-xr-x | util/dbgraph.pl | 2 | ||||
-rw-r--r-- | util/dump.sql | 10 | ||||
-rw-r--r-- | util/updates/update_2.3.sql | 7 |
3 files changed, 18 insertions, 1 deletions
diff --git a/util/dbgraph.pl b/util/dbgraph.pl index be76bca9..5fd52b75 100755 --- a/util/dbgraph.pl +++ b/util/dbgraph.pl @@ -21,7 +21,7 @@ my %subgraphs = ( 'Visual Novels' => [qw| FFE6BE vn vn_rev vn_relations vn_categories vn_anime vn_screenshots |], 'Users' => [qw| CCFFFF users votes vnlists rlists wlists |], 'Discussion board' => [qw| FFDCDC threads threads_tags threads_posts |], - 'Misc' => [qw| F5F5F5 changes anime screenshots relgraph stats_cache |], + 'Misc' => [qw| F5F5F5 changes anime screenshots relgraph stats_cache quotes |], ); my %tables; # table_name => [ [ col1, pri ], ... ] diff --git a/util/dump.sql b/util/dump.sql index f23d6d62..3d937832 100644 --- a/util/dump.sql +++ b/util/dump.sql @@ -61,6 +61,15 @@ CREATE TABLE producers_rev ( "desc" text NOT NULL DEFAULT '' ); + +-- quotes +CREATE TABLE quotes ( + vid integer NOT NULL, + quote varchar(250) NOT NULL, + PRIMARY KEY(vid, quote) +); + + -- releases CREATE TABLE releases ( id SERIAL NOT NULL PRIMARY KEY, @@ -296,6 +305,7 @@ ALTER TABLE changes ADD FOREIGN KEY (causedby) REFERENCES changes 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; +ALTER TABLE quotes ADD FOREIGN KEY (vid) REFERENCES vn (id) DEFERRABLE INITIALLY DEFERRED; ALTER TABLE releases ADD FOREIGN KEY (latest) REFERENCES releases_rev (id) DEFERRABLE INITIALLY DEFERRED; ALTER TABLE releases_media ADD FOREIGN KEY (rid) REFERENCES releases_rev (id) DEFERRABLE INITIALLY DEFERRED; ALTER TABLE releases_platforms ADD FOREIGN KEY (rid) REFERENCES releases_rev (id) DEFERRABLE INITIALLY DEFERRED; diff --git a/util/updates/update_2.3.sql b/util/updates/update_2.3.sql new file mode 100644 index 00000000..4faeba5a --- /dev/null +++ b/util/updates/update_2.3.sql @@ -0,0 +1,7 @@ + +CREATE TABLE quotes ( + vid integer NOT NULL REFERENCES vn (id), + quote varchar(250) NOT NULL, + PRIMARY KEY(vid, quote) +) WITHOUT OIDS; + |