LP#1155313: pin upgrade script to 0914
authorGalen Charlton <gmc@esilibrary.com>
Mon, 2 Mar 2015 14:05:52 +0000 (14:05 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 2 Mar 2015 14:05:52 +0000 (14:05 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0914.schema.redo_vandelay_merge_profile_sequence.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lpad-number-repair.sql [deleted file]

index 97288b3..5e1a892 100644 (file)
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0913', :eg_version); -- remington/bshum
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0914', :eg_version); -- dpearl/gmcharlt
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
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
new file mode 100644 (file)
index 0000000..2002771
--- /dev/null
@@ -0,0 +1,21 @@
+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;
+
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lpad-number-repair.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lpad-number-repair.sql
deleted file mode 100644 (file)
index 7b79fc4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-BEGIN;
-
-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;
-