From: Mike Rylander Date: Fri, 19 Apr 2013 20:19:11 +0000 (-0400) Subject: Stamping best-hold-order update script X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d46585ed0e2816cd641242bfb292f0869f01950c;p=evergreen%2Fpines.git Stamping best-hold-order update script Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index b9068db060..5a955d4866 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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 ('0791', :eg_version); -- senator/miker +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0793', :eg_version); -- senator/miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0793.data.best-hold-order-traditional-approx.sql b/Open-ILS/src/sql/Pg/upgrade/0793.data.best-hold-order-traditional-approx.sql new file mode 100644 index 0000000000..01db9973cf --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0793.data.best-hold-order-traditional-approx.sql @@ -0,0 +1,67 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0792', :eg_version); + +UPDATE config.best_hold_order +SET + approx = 1, + pprox = 2, + aprox = 3, + priority = 4, + cut = 5, + depth = 6, + rtime = 7, + hprox = NULL, + htime = NULL +WHERE name = 'Traditional' AND + pprox = 1 AND + aprox = 2 AND + priority = 3 AND + cut = 4 AND + depth = 5 AND + rtime = 6 ; + +UPDATE config.best_hold_order +SET + hprox = 1, + approx = 2, + pprox = 3, + aprox = 4, + priority = 5, + cut = 6, + depth = 7, + rtime = 8, + htime = NULL +WHERE name = 'Traditional with Holds-always-go-home' AND + hprox = 1 AND + pprox = 2 AND + aprox = 3 AND + priority = 4 AND + cut = 5 AND + depth = 6 AND + rtime = 7 AND + htime = 8; + +UPDATE config.best_hold_order +SET + htime = 1, + approx = 2, + pprox = 3, + aprox = 4, + priority = 5, + cut = 6, + depth = 7, + rtime = 8, + hprox = NULL +WHERE name = 'Traditional with Holds-go-home' AND + htime = 1 AND + hprox = 2 AND + pprox = 3 AND + aprox = 4 AND + priority = 5 AND + cut = 6 AND + depth = 7 AND + rtime = 8 ; + + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.best-hold-order-traditional-approx.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.best-hold-order-traditional-approx.sql deleted file mode 100644 index ddd525d551..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.best-hold-order-traditional-approx.sql +++ /dev/null @@ -1,67 +0,0 @@ -BEGIN; - --- INSERT INTO config.upgrade_log (version) VALUES ('XXXX'); - -UPDATE config.best_hold_order -SET - approx = 1, - pprox = 2, - aprox = 3, - priority = 4, - cut = 5, - depth = 6, - rtime = 7, - hprox = NULL, - htime = NULL -WHERE name = 'Traditional' AND - pprox = 1 AND - aprox = 2 AND - priority = 3 AND - cut = 4 AND - depth = 5 AND - rtime = 6 ; - -UPDATE config.best_hold_order -SET - hprox = 1, - approx = 2, - pprox = 3, - aprox = 4, - priority = 5, - cut = 6, - depth = 7, - rtime = 8, - htime = NULL -WHERE name = 'Traditional with Holds-always-go-home' AND - hprox = 1 AND - pprox = 2 AND - aprox = 3 AND - priority = 4 AND - cut = 5 AND - depth = 6 AND - rtime = 7 AND - htime = 8; - -UPDATE config.best_hold_order -SET - htime = 1, - approx = 2, - pprox = 3, - aprox = 4, - priority = 5, - cut = 6, - depth = 7, - rtime = 8, - hprox = NULL -WHERE name = 'Traditional with Holds-go-home' AND - htime = 1 AND - hprox = 2 AND - pprox = 3 AND - aprox = 4 AND - priority = 5 AND - cut = 6 AND - depth = 7 AND - rtime = 8 ; - - -COMMIT;