[open-ils-commits] r9529 - branches/rel_1_2/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 8 08:26:55 EDT 2008
Author: miker
Date: 2008-05-08 08:26:54 -0400 (Thu, 08 May 2008)
New Revision: 9529
Modified:
branches/rel_1_2/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql
Log:
reordering some commands for update success
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-05-07 20:47:17 UTC (rev 9528)
+++ branches/rel_1_2/Open-ILS/src/sql/Pg/1.2.1-1.2.2-upgrade-db.sql 2008-05-08 12:26:54 UTC (rev 9529)
@@ -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