From 1540a0f463d0646d4dc2f01f115680a2e3504c40 Mon Sep 17 00:00:00 2001 From: scottmk Date: Tue, 22 Sep 2009 19:24:08 +0000 Subject: [PATCH] Changing the rules for database upgrades: config.upgrade_log.version will henceforth be all-numeric. git-svn-id: svn://svn.open-ils.org/ILS/trunk@14095 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../0001.data.config.org_unit_setting_type.sql | 2 +- ...002.schema.hold-index-on-unfilled_hold_list.sql | 2 +- .../Pg/upgrade/0003.schema.hold-loop-counting.sql | 2 +- .../0004.data.org-setting-precat-circ-lib.sql | 2 +- ...05.data.org-setting-max-claims-return-count.sql | 2 +- ...0006.data.override-max-claims-returned-perm.sql | 2 +- ...07.data.org-setting-checkout-auto-renew-age.sql | 2 +- ....org-setting-lib-supports-behind-desk-holds.sql | 2 +- .../0009.data.action-trigger-hold-cancel-hook.sql | 2 +- .../upgrade/0010.schema.asset-copy-dummy-isbn.sql | 2 +- .../upgrade/0011.data.org-setting-no-autoprint.sql | 2 +- .../Pg/upgrade/0012.schema.circ-parent-circ.sql | 2 +- .../0013.schema.circ-checkin-ws-and-scan-time.sql | 2 +- .../0014.data.upgrade-versions-numeric-only.sql | 22 ++++++++++++++++++++++ 14 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0014.data.upgrade-versions-numeric-only.sql diff --git a/Open-ILS/src/sql/Pg/upgrade/0001.data.config.org_unit_setting_type.sql b/Open-ILS/src/sql/Pg/upgrade/0001.data.config.org_unit_setting_type.sql index 395d525d4..9629d6522 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0001.data.config.org_unit_setting_type.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0001.data.config.org_unit_setting_type.sql @@ -2,7 +2,7 @@ BEGIN; -- Org Unit Settings for configuring org unit weights and org unit max-loops for hold targeting -INSERT INTO config.upgrade_log (version) VALUES ('0001.data.config.org_unit_setting_type.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0001'); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( 'circ.holds.org_unit_target_weight', diff --git a/Open-ILS/src/sql/Pg/upgrade/0002.schema.hold-index-on-unfilled_hold_list.sql b/Open-ILS/src/sql/Pg/upgrade/0002.schema.hold-index-on-unfilled_hold_list.sql index 4e28cdad2..af42bff1a 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0002.schema.hold-index-on-unfilled_hold_list.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0002.schema.hold-index-on-unfilled_hold_list.sql @@ -1,4 +1,4 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0002.schema.hold-index-on-unfilled_hold_list.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0002'); CREATE INDEX uhr_hold_idx ON action.unfulfilled_hold_list (hold); COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/0003.schema.hold-loop-counting.sql b/Open-ILS/src/sql/Pg/upgrade/0003.schema.hold-loop-counting.sql index f222d1e25..5d1e25442 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0003.schema.hold-loop-counting.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0003.schema.hold-loop-counting.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0003.schema.hold-loop-counting.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0003'); CREATE OR REPLACE VIEW action.unfulfilled_hold_loops AS SELECT u.hold, diff --git a/Open-ILS/src/sql/Pg/upgrade/0004.data.org-setting-precat-circ-lib.sql b/Open-ILS/src/sql/Pg/upgrade/0004.data.org-setting-precat-circ-lib.sql index ff678b087..bd2a2fb40 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0004.data.org-setting-precat-circ-lib.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0004.data.org-setting-precat-circ-lib.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0004.data.org-setting-precat-circ-lib.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0004'); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( 'circ.pre_cat_copy_circ_lib', diff --git a/Open-ILS/src/sql/Pg/upgrade/0005.data.org-setting-max-claims-return-count.sql b/Open-ILS/src/sql/Pg/upgrade/0005.data.org-setting-max-claims-return-count.sql index b7bfa6fdd..f6f5833c9 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0005.data.org-setting-max-claims-return-count.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0005.data.org-setting-max-claims-return-count.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0005.data.org-setting-max-claims-return-count.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0005'); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( 'circ.max_patron_claim_return_count', diff --git a/Open-ILS/src/sql/Pg/upgrade/0006.data.override-max-claims-returned-perm.sql b/Open-ILS/src/sql/Pg/upgrade/0006.data.override-max-claims-returned-perm.sql index c68bbe76f..bf9092226 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0006.data.override-max-claims-returned-perm.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0006.data.override-max-claims-returned-perm.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0006.data.override-max-claims-returned-perm.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0006'); INSERT INTO permission.perm_list (code, description) VALUES ( 'SET_CIRC_CLAIMS_RETURNED.override', diff --git a/Open-ILS/src/sql/Pg/upgrade/0007.data.org-setting-checkout-auto-renew-age.sql b/Open-ILS/src/sql/Pg/upgrade/0007.data.org-setting-checkout-auto-renew-age.sql index 3469e0c1a..9bc75966c 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0007.data.org-setting-checkout-auto-renew-age.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0007.data.org-setting-checkout-auto-renew-age.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0007.data.org-setting-checkout-auto-renew-age.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0007'); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( 'circ.checkout_auto_renew_age', diff --git a/Open-ILS/src/sql/Pg/upgrade/0008.data.org-setting-lib-supports-behind-desk-holds.sql b/Open-ILS/src/sql/Pg/upgrade/0008.data.org-setting-lib-supports-behind-desk-holds.sql index 1167995a9..dcaed34a3 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0008.data.org-setting-lib-supports-behind-desk-holds.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0008.data.org-setting-lib-supports-behind-desk-holds.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0008.data.org-setting-lib-supports-behind-desk-holds.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0008'); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( 'circ.holds.behind_desk_pickup_supported', diff --git a/Open-ILS/src/sql/Pg/upgrade/0009.data.action-trigger-hold-cancel-hook.sql b/Open-ILS/src/sql/Pg/upgrade/0009.data.action-trigger-hold-cancel-hook.sql index 144bb3a16..3554fb802 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0009.data.action-trigger-hold-cancel-hook.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0009.data.action-trigger-hold-cancel-hook.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0009.data.action-trigger-hold-cancel-hook.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0009'); INSERT INTO action_trigger.hook (key,core_type,description) VALUES ( 'hold_request.cancel.expire_no_target', diff --git a/Open-ILS/src/sql/Pg/upgrade/0010.schema.asset-copy-dummy-isbn.sql b/Open-ILS/src/sql/Pg/upgrade/0010.schema.asset-copy-dummy-isbn.sql index 478991053..9ce7a8b8c 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0010.schema.asset-copy-dummy-isbn.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0010.schema.asset-copy-dummy-isbn.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0010.schema.asset-copy-dummy-isbn.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0010'); ALTER TABLE asset.copy ADD COLUMN dummy_isbn TEXT; diff --git a/Open-ILS/src/sql/Pg/upgrade/0011.data.org-setting-no-autoprint.sql b/Open-ILS/src/sql/Pg/upgrade/0011.data.org-setting-no-autoprint.sql index 9544ab058..6cec3c531 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0011.data.org-setting-no-autoprint.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0011.data.org-setting-no-autoprint.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0011.data.org-setting-no-autoprint.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0011'); INSERT INTO config.org_unit_setting_type (name, label, description, datatype) VALUES ( 'circ.staff_client.do_not_auto_attempt_print', diff --git a/Open-ILS/src/sql/Pg/upgrade/0012.schema.circ-parent-circ.sql b/Open-ILS/src/sql/Pg/upgrade/0012.schema.circ-parent-circ.sql index 0a4516343..3fa4ee75f 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0012.schema.circ-parent-circ.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0012.schema.circ-parent-circ.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0012.schema.circ-parent-circ.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0012'); ALTER TABLE action.circulation ADD COLUMN parent_circ BIGINT diff --git a/Open-ILS/src/sql/Pg/upgrade/0013.schema.circ-checkin-ws-and-scan-time.sql b/Open-ILS/src/sql/Pg/upgrade/0013.schema.circ-checkin-ws-and-scan-time.sql index 6539fe1e0..f666dfdfa 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0013.schema.circ-checkin-ws-and-scan-time.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0013.schema.circ-checkin-ws-and-scan-time.sql @@ -1,6 +1,6 @@ BEGIN; -INSERT INTO config.upgrade_log (version) VALUES ('0013.schema.circ-checkin-ws-and-scan-time.sql'); +INSERT INTO config.upgrade_log (version) VALUES ('0013'); ALTER TABLE action.circulation ADD COLUMN checkin_workstation INT diff --git a/Open-ILS/src/sql/Pg/upgrade/0014.data.upgrade-versions-numeric-only.sql b/Open-ILS/src/sql/Pg/upgrade/0014.data.upgrade-versions-numeric-only.sql new file mode 100644 index 000000000..839db8a2a --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0014.data.upgrade-versions-numeric-only.sql @@ -0,0 +1,22 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0014'); + +-- Changing the rules retroactively: +-- versions should be numeric only + +UPDATE config.upgrade_log set version = '0001' where version = '0001.data.config.org_unit_setting_type.sql'; +UPDATE config.upgrade_log set version = '0002' where version = '0002.schema.hold-index-on-unfilled_hold_list.sql'; +UPDATE config.upgrade_log set version = '0003' where version = '0003.schema.hold-loop-counting.sql'; +UPDATE config.upgrade_log set version = '0004' where version = '0004.data.org-setting-precat-circ-lib.sql'; +UPDATE config.upgrade_log set version = '0005' where version = '0005.data.org-setting-max-claims-return-count.sql'; +UPDATE config.upgrade_log set version = '0006' where version = '0006.data.override-max-claims-returned-perm.sql'; +UPDATE config.upgrade_log set version = '0007' where version = '0007.data.org-setting-checkout-auto-renew-age.sql'; +UPDATE config.upgrade_log set version = '0008' where version = '0008.data.org-setting-lib-supports-behind-desk-holds.sql'; +UPDATE config.upgrade_log set version = '0009' where version = '0009.data.action-trigger-hold-cancel-hook.sql'; +UPDATE config.upgrade_log set version = '0010' where version = '0010.schema.asset-copy-dummy-isbn.sql'; +UPDATE config.upgrade_log set version = '0011' where version = '0011.data.org-setting-no-autoprint.sql'; +UPDATE config.upgrade_log set version = '0012' where version = '0012.schema.circ-parent-circ.sql'; +UPDATE config.upgrade_log set version = '0013' where version = '0013.schema.circ-checkin-ws-and-scan-time.sql'; + +COMMIT; -- 2.11.0