LP#1155313: fix mangling of schema upgrade script name
authorGalen Charlton <gmc@esilibrary.com>
Mon, 2 Mar 2015 14:56:34 +0000 (14:56 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 2 Mar 2015 14:56:34 +0000 (14:56 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/upgrade/0914.schema.lpad-number-repair.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/0914.schema.redo_vandelay_merge_profile_sequence.sql [deleted file]

diff --git a/Open-ILS/src/sql/Pg/upgrade/0914.schema.lpad-number-repair.sql b/Open-ILS/src/sql/Pg/upgrade/0914.schema.lpad-number-repair.sql
new file mode 100644 (file)
index 0000000..2d2d1f7
--- /dev/null
@@ -0,0 +1,25 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0914', :eg_version);
+
+CREATE OR REPLACE FUNCTION evergreen.lpad_number_substrings( TEXT, TEXT, INT ) RETURNS TEXT AS $$
+    my $string = shift;            # Source string
+    my $pad = shift;               # string to fill.  Typically '0'. This should be a single character.
+    my $len = shift;               # length of resultant padded field
+    my $find = $len - 1;
+
+    while ($string =~ /(^|\D)(\d{1,$find})($|\D)/) {
+        my $padded = $2;
+        $padded = $pad x ($len - length($padded)) . $padded;
+        $string = $` . $1 . $padded . $3 . $';
+    }
+
+    return $string;
+$$ LANGUAGE PLPERLU;
+
+COMMIT;
+
+-- recompute the various normalized label fields that use lpad_number_substrings()
+UPDATE biblio.monograph_part SET id = id;
+UPDATE asset.call_number_prefix SET id = id;
+UPDATE asset.call_number_suffix SET id = id;
diff --git a/Open-ILS/src/sql/Pg/upgrade/0914.schema.redo_vandelay_merge_profile_sequence.sql b/Open-ILS/src/sql/Pg/upgrade/0914.schema.redo_vandelay_merge_profile_sequence.sql
deleted file mode 100644 (file)
index 2d2d1f7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('0914', :eg_version);
-
-CREATE OR REPLACE FUNCTION evergreen.lpad_number_substrings( TEXT, TEXT, INT ) RETURNS TEXT AS $$
-    my $string = shift;            # Source string
-    my $pad = shift;               # string to fill.  Typically '0'. This should be a single character.
-    my $len = shift;               # length of resultant padded field
-    my $find = $len - 1;
-
-    while ($string =~ /(^|\D)(\d{1,$find})($|\D)/) {
-        my $padded = $2;
-        $padded = $pad x ($len - length($padded)) . $padded;
-        $string = $` . $1 . $padded . $3 . $';
-    }
-
-    return $string;
-$$ LANGUAGE PLPERLU;
-
-COMMIT;
-
--- recompute the various normalized label fields that use lpad_number_substrings()
-UPDATE biblio.monograph_part SET id = id;
-UPDATE asset.call_number_prefix SET id = id;
-UPDATE asset.call_number_suffix SET id = id;