[open-ils-commits] r9486 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 29 14:30:15 EDT 2008
Author: miker
Date: 2008-04-29 13:50:09 -0400 (Tue, 29 Apr 2008)
New Revision: 9486
Modified:
trunk/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql
Log:
protecting against existing views
Modified: trunk/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql 2008-04-29 17:47:57 UTC (rev 9485)
+++ trunk/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql 2008-04-29 17:50:09 UTC (rev 9486)
@@ -90,6 +90,7 @@
/* convenience views for report management */
-------------------------------------------------------------------
+DROP VIEW reporter.overdue_reports;
CREATE OR REPLACE VIEW reporter.overdue_reports AS
SELECT s.id, c.barcode AS runner_barcode, r.name, s.run_time, s.run_time - now() AS scheduled_wait_time
FROM reporter.schedule s
@@ -98,6 +99,7 @@
JOIN actor.card c ON c.id = u.card
WHERE s.start_time IS NULL AND s.run_time < now();
+DROP VIEW reporter.pending_reports;
CREATE OR REPLACE VIEW reporter.pending_reports AS
SELECT s.id, c.barcode AS runner_barcode, r.name, s.run_time, s.run_time - now() AS scheduled_wait_time
FROM reporter.schedule s
@@ -106,6 +108,7 @@
JOIN actor.card c ON c.id = u.card
WHERE s.start_time IS NULL;
+DROP VIEW reporter.currently_running;
CREATE OR REPLACE VIEW reporter.currently_running AS
SELECT s.id, c.barcode AS runner_barcode, r.name, s.run_time, s.run_time - now() AS scheduled_wait_time
FROM reporter.schedule s
More information about the open-ils-commits
mailing list