]> git.sur5r.net Git - bacula/bacula/blobdiff - gui/bweb/script/bweb-postgresql.sql
bweb: Add sqlite support
[bacula/bacula] / gui / bweb / script / bweb-postgresql.sql
index 50f57297c96c31bce5692999b978df0ec2c0934d..3c9aa630274f8c7300fc3d0327933e417466b066 100644 (file)
@@ -1,6 +1,22 @@
 -- Require > 7.4, else use createlang command
 CREATE PROCEDURAL LANGUAGE plpgsql;
 
+-- --------------------------------------------------
+-- Upgrade from 5.0
+-- --------------------------------------------------
+
+BEGIN;
+
+-- PG 8.4 drops implicit cast from double to bigint
+CREATE FUNCTION SEC_TO_TIME(double precision)
+RETURNS interval AS $$
+    select date_trunc('second', $1 * interval '1 second');
+$$ LANGUAGE SQL;
+
+COMMIT;
+
+CREATE UNIQUE INDEX location_idx ON Location (Location);
+
 -- --------------------------------------------------
 -- Upgrade from 2.2
 -- --------------------------------------------------