[open-ils-commits] r9485 - branches/rel_1_2/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 29 14:28:04 EDT 2008
Author: miker
Date: 2008-04-29 13:47:57 -0400 (Tue, 29 Apr 2008)
New Revision: 9485
Modified:
branches/rel_1_2/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql
Log:
protecting against existing views
Modified: branches/rel_1_2/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql
===================================================================
--- branches/rel_1_2/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql 2008-04-29 14:25:52 UTC (rev 9484)
+++ branches/rel_1_2/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql 2008-04-29 17:47:57 UTC (rev 9485)
@@ -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