[open-ils-commits] r9506 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun May 4 19:51:09 EDT 2008
Author: miker
Date: 2008-05-04 19:51:08 -0400 (Sun, 04 May 2008)
New Revision: 9506
Modified:
trunk/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql
Log:
break up the transactions a bit more, and move DROPs outside of transactions, as they are allowed to fail
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-05-03 11:58:45 UTC (rev 9505)
+++ trunk/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql 2008-05-04 23:51:08 UTC (rev 9506)
@@ -82,7 +82,9 @@
COMMIT;
-DROP SCHEMA search CASCADE;
+DROP VIEW reporter.overdue_reports;
+DROP VIEW reporter.pending_reports;
+DROP VIEW reporter.currently_running;
BEGIN;
@@ -90,7 +92,6 @@
/* 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
@@ -99,7 +100,6 @@
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
@@ -108,7 +108,6 @@
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
@@ -148,7 +147,7 @@
CREATE OR REPLACE FUNCTION public.call_number_dewey( TEXT ) RETURNS TEXT AS $$
my $txt = shift;
$txt =~ s/^\s+//o;
- $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//o;
+ $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//o; #' To help vim in SQL mode
$txt =~ s/\s+$//o;
if ($txt =~ /(\d{3}(?:\.\d+)?)/o) {
return $1;
@@ -157,7 +156,11 @@
}
$$ LANGUAGE 'plperlu' STRICT IMMUTABLE;
+COMMIT;
+DROP SCHEMA search CASCADE;
+BEGIN;
+
-------------------------------------------------------------------
/* staged search -- also applied by 300.schema.staged_search.sql */
-------------------------------------------------------------------
More information about the open-ils-commits
mailing list