summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-09-25 18:37:54 +0200
committerYorhel <git@yorhel.nl>2009-09-25 18:37:54 +0200
commit9ba57996ed6d7fe3dd0d0c1fe5e1b3827b8a2b8a (patch)
tree3c1de7f256c35b1caa833610d27b06923f783fe5 /util
parentfcf1e7f020b267c0efd6f7fd0a973baf682bd075 (diff)
Use inline SVG for relation graphs
The graphs are now stored in the DB in SVG format, the static/rg/ directory can be removed (not used anymore). SVG data is stored using the xml data type, so now I can say for sure you'd need at least PostgreSQL 8.3. This feature still needs some tweaking, though. Current state isn't perfect.
Diffstat (limited to 'util')
-rwxr-xr-xutil/init.pl2
-rw-r--r--util/updates/update_2.8.sql16
2 files changed, 17 insertions, 1 deletions
diff --git a/util/init.pl b/util/init.pl
index 5c171705..ac533174 100755
--- a/util/init.pl
+++ b/util/init.pl
@@ -22,7 +22,7 @@ print "\n";
print "Creating directory structures...\n";
-for my $d (qw| cv rg st sf |) {
+for my $d (qw| cv st sf |) {
print " /static/$d\n";
mkdir "$ROOT/static/$d" or die "mkdir '$ROOT/static/$d': $!\n";
for my $i (0..99) {
diff --git a/util/updates/update_2.8.sql b/util/updates/update_2.8.sql
new file mode 100644
index 00000000..a48c1e73
--- /dev/null
+++ b/util/updates/update_2.8.sql
@@ -0,0 +1,16 @@
+
+-- !BEFORE! running this SQL file, make sure to kill Multi,
+-- After running this SQL file, also make sure to do a:
+-- $ rm -r static/rg/
+-- And start multi again
+
+-- VN Relation graphs are stored in the database as SVG - no cmaps and .png anymore
+UPDATE vn SET rgraph = NULL;
+ALTER TABLE vn DROP CONSTRAINT vn_rgraph_fkey;
+DROP TABLE relgraph;
+CREATE TABLE vn_graphs (
+ id SERIAL PRIMARY KEY,
+ svg xml NOT NULL
+);
+ALTER TABLE vn ADD FOREIGN KEY (rgraph) REFERENCES vn_graphs (id);
+