LP#1464765: stamp upgrade script
authorGalen Charlton <gmc@esilibrary.com>
Thu, 5 Nov 2015 15:44:43 +0000 (15:44 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 5 Nov 2015 15:44:43 +0000 (15:44 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0947.function.lpad_number_fix.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.function.lpad_number_fix.sql [deleted file]

index b0739fb..ab7b39f 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 ('0946', :eg_version); -- gmcharlt/berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0947', :eg_version); -- jboyer/gmcharlt
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0947.function.lpad_number_fix.sql b/Open-ILS/src/sql/Pg/upgrade/0947.function.lpad_number_fix.sql
new file mode 100644 (file)
index 0000000..8293eec
--- /dev/null
@@ -0,0 +1,15 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0947', :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
+
+    $string =~ s/([0-9]+)/$pad x ($len - length($1)) . $1/eg;
+
+    return $string;
+$$ LANGUAGE PLPERLU;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.function.lpad_number_fix.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.function.lpad_number_fix.sql
deleted file mode 100644 (file)
index 3b31f94..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :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
-
-    $string =~ s/([0-9]+)/$pad x ($len - length($1)) . $1/eg;
-
-    return $string;
-$$ LANGUAGE PLPERLU;
-
-COMMIT;