Stamping upgrade script for badge seed data
authorMike Rylander <mrylander@gmail.com>
Wed, 24 Aug 2016 18:55:29 +0000 (14:55 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 24 Aug 2016 18:55:29 +0000 (14:55 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0995.data.popularity-badge-seed-data.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.popularity-badge-seed-data.sql [deleted file]

index d696bf5..d0fc23a 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 ('0994', :eg_version); -- berick/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0995', :eg_version); -- kmlussier/miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0995.data.popularity-badge-seed-data.sql b/Open-ILS/src/sql/Pg/upgrade/0995.data.popularity-badge-seed-data.sql
new file mode 100644 (file)
index 0000000..fe9ea27
--- /dev/null
@@ -0,0 +1,8 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0995', :eg_version);
+
+INSERT INTO rating.badge (name, description, scope, weight, horizon_age, importance_age, importance_interval, importance_scale, recalc_interval, popularity_parameter, percentile)
+   VALUES('Top Holds Over Last 5 Years', 'The top 97th percentile for holds requested over the past five years on all materials. More weight is given to holds requested over the last year, with importance decreasing for every year after that.', 1, 3, '5 years', '5 years', '1 year', 2, '1 day', 2, 97);
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.popularity-badge-seed-data.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.popularity-badge-seed-data.sql
deleted file mode 100644 (file)
index 61f9118..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-BEGIN;
-
--SELECT evergreen.upgrade_deps_block_check('xxxx', :eg_version);
-
-INSERT INTO rating.badge (name, description, scope, weight, horizon_age, importance_age, importance_interval, importance_scale, recalc_interval, popularity_parameter, percentile)
-   VALUES('Top Holds Over Last 5 Years', 'The top 97th percentile for holds requested over the past five years on all materials. More weight is given to holds requested over the last year, with importance decreasing for every year after that.', 1, 3, '5 years', '5 years', '1 year', 2, '1 day', 2, 97);
-
-COMMIT;