summaryrefslogtreecommitdiff
path: root/util/updates
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/updates
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/updates')
-rw-r--r--util/updates/update_2.8.sql16
1 files changed, 16 insertions, 0 deletions
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);
+