summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-04-06 18:22:47 +0200
committerYorhel <git@yorhel.nl>2020-04-06 18:22:47 +0200
commit7cfc606c4ae05814fb4dde6fce90dcb09cb93679 (patch)
tree5be04b0c10e7f2e676bd6d8cb57d7eb51f590fd2 /util
parent91c5ca72e9c90c5a60f71e53a68c980094a59da8 (diff)
Delete old relation graph generating and caching machinery
Diffstat (limited to 'util')
-rwxr-xr-xutil/devdump.pl2
-rw-r--r--util/updates/2020-04-06-drop-relgraphs.sql9
2 files changed, 9 insertions, 2 deletions
diff --git a/util/devdump.pl b/util/devdump.pl
index 9ee1959f..1973a7be 100755
--- a/util/devdump.pl
+++ b/util/devdump.pl
@@ -149,7 +149,6 @@ sub copy_entry {
copy_entry s => [qw/staff staff_alias/], $staff;
# Producers (TODO: Relations)
- copy 'relgraphs', "SELECT DISTINCT ON (r.id) r.* FROM relgraphs r JOIN producers p ON p.rgraph = r.id WHERE p.id IN(".join(',', @$producers).")", {};
copy_entry p => [qw/producers/], $producers;
# Characters
@@ -157,7 +156,6 @@ sub copy_entry {
# Visual novels
copy anime => "SELECT DISTINCT a.* FROM anime a JOIN vn_anime_hist v ON v.aid = a.id JOIN changes c ON c.id = v.chid WHERE c.type = 'v' AND c.itemid IN($vids)";
- copy relgraphs => "SELECT DISTINCT ON (r.id) r.* FROM relgraphs r JOIN vn v ON v.rgraph = r.id WHERE v.id IN($vids)", {};
copy_entry v => [qw/vn vn_anime vn_seiyuu vn_staff vn_relations vn_screenshots/], \@vids;
# VN-related niceties
diff --git a/util/updates/2020-04-06-drop-relgraphs.sql b/util/updates/2020-04-06-drop-relgraphs.sql
new file mode 100644
index 00000000..b9edcf6d
--- /dev/null
+++ b/util/updates/2020-04-06-drop-relgraphs.sql
@@ -0,0 +1,9 @@
+DROP TRIGGER vn_relgraph_notify ON vn;
+DROP FUNCTION vn_relgraph_notify();
+
+DROP TRIGGER producer_relgraph_notify ON producers;
+DROP FUNCTION producer_relgraph_notify();
+
+ALTER TABLE vn DROP COLUMN rgraph;
+ALTER TABLE producers DROP COLUMN rgraph;
+DROP TABLE relgraphs;