summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-21 14:21:38 +0200
committerYorhel <git@yorhel.nl>2009-10-21 14:24:10 +0200
commit96e77619793fbe8351e023d17e257e96cdb37509 (patch)
tree6d501f042ffeb7b0dd852a9430aeb5690548c5c1 /lib
parent0325073d1eb045628f6090c7be4ee9685d7ec159 (diff)
SQL: Renamed vn_graphs to relgraphs and synced dbgraph.pl
As the same table can easily be used to store producer relation graphs as well.
Diffstat (limited to 'lib')
-rw-r--r--lib/Multi/Maintenance.pm2
-rw-r--r--lib/Multi/RG.pm2
-rw-r--r--lib/VNDB/DB/VN.pm2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/Multi/Maintenance.pm b/lib/Multi/Maintenance.pm
index 59d30ce6..ecc80486 100644
--- a/lib/Multi/Maintenance.pm
+++ b/lib/Multi/Maintenance.pm
@@ -119,7 +119,7 @@ sub vnpopularity {
sub cleangraphs {
# should be pretty fast
- $_[KERNEL]->post(pg => do => 'DELETE FROM vn_graphs vg WHERE NOT EXISTS(SELECT 1 FROM vn WHERE rgraph = vg.id)',
+ $_[KERNEL]->post(pg => do => 'DELETE FROM relgraphs vg WHERE NOT EXISTS(SELECT 1 FROM vn WHERE rgraph = vg.id)',
undef, 'log_stats', 'cleangraphs');
}
diff --git a/lib/Multi/RG.pm b/lib/Multi/RG.pm
index 1ee69911..5cb03ed4 100644
--- a/lib/Multi/RG.pm
+++ b/lib/Multi/RG.pm
@@ -220,7 +220,7 @@ sub savegraph {
$w->end();
# save the processed SVG in the database and fetch graph ID
- $_[KERNEL]->post(pg => query => 'INSERT INTO vn_graphs (svg) VALUES (?) RETURNING id', [ $svg ], 'finish');
+ $_[KERNEL]->post(pg => query => 'INSERT INTO relgraphs (svg) VALUES (?) RETURNING id', [ $svg ], 'finish');
}
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index 662057d5..bb2c1275 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -77,7 +77,7 @@ sub dbVNGet {
$o{what} =~ /changes/ ?
'JOIN users u ON u.id = c.requester' : (),
$o{what} =~ /relgraph/ ?
- 'JOIN vn_graphs vg ON vg.id = v.rgraph' : (),
+ 'JOIN relgraphs vg ON vg.id = v.rgraph' : (),
);
my $tag_ids = $o{tags_include} && join ',', @{$o{tags_include}[1]};