From: Galen Charlton Date: Mon, 19 Jun 2017 16:18:19 +0000 (-0400) Subject: LP#1691237: stamp schema update X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8054e9ebbd317fe0262a5d9fd37e789bfd46cbcb;p=working%2FEvergreen.git LP#1691237: stamp schema update Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index df2bb56515..07d491e9f7 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -90,7 +90,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 ('1045', :eg_version); -- csharp/berick/gmcharlt +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1046', :eg_version); -- phasefx/berick/gmcharlt CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1046.data.webstaff_date_format_ou_settings.sql b/Open-ILS/src/sql/Pg/upgrade/1046.data.webstaff_date_format_ou_settings.sql new file mode 100644 index 0000000000..d1e302700a --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1046.data.webstaff_date_format_ou_settings.sql @@ -0,0 +1,53 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1046', :eg_version); -- phasefx/berick/gmcharlt + +INSERT into config.org_unit_setting_type ( + name + ,grp + ,label + ,description + ,datatype +) VALUES ( ---------------------------------------- + 'webstaff.format.dates' + ,'gui' + ,oils_i18n_gettext( + 'webstaff.format.dates' + ,'Format Dates with this pattern' + ,'coust' + ,'label' + ) + ,oils_i18n_gettext( + 'webstaff.format.dates' + ,'Format Dates with this pattern (examples: "yyyy-MM-dd" for "2010-04-26", "MMM d, yyyy" for "Apr 26, 2010"). This will be used in areas where a date without a timestamp is sufficient, like Date of Birth.' + ,'coust' + ,'description' + ) + ,'string' +), ( ---------------------------------------- + 'webstaff.format.date_and_time' + ,'gui' + ,oils_i18n_gettext( + 'webstaff.format.date_and_time' + ,'Format Date+Time with this pattern' + ,'coust' + ,'label' + ) + ,oils_i18n_gettext( + 'webstaff.format.date_and_time' + ,'Format Date+Time with this pattern (examples: "yy-MM-dd h:m:s.SSS a" for "16-04-05 2:07:20.666 PM", "yyyy-dd-MMM HH:mm" for "2016-05-Apr 14:07"). This will be used in areas of the client where a date with a timestamp is needed, like Checkout, Due Date, or Record Created.' + ,'coust' + ,'description' + ) + ,'string' +); + +UPDATE + config.org_unit_setting_type +SET + label = 'Deprecated: ' || label -- FIXME: Is this okay? +WHERE + name IN ('format.date','format.time') +; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.webstaff_date_format_ou_settings.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.webstaff_date_format_ou_settings.sql deleted file mode 100644 index a7ac6af63d..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.webstaff_date_format_ou_settings.sql +++ /dev/null @@ -1,68 +0,0 @@ -BEGIN; - ---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -INSERT into config.org_unit_setting_type ( - name - ,grp - ,label - ,description - ,datatype -) VALUES ( ---------------------------------------- - 'webstaff.format.dates' - ,'gui' - ,oils_i18n_gettext( - 'webstaff.format.dates' - ,'Format Dates with this pattern' - ,'coust' - ,'label' - ) - ,oils_i18n_gettext( - 'webstaff.format.dates' - ,'Format Dates with this pattern (examples: "yyyy-MM-dd" for "2010-04-26", "MMM d, yyyy" for "Apr 26, 2010"). This will be used in areas where a date without a timestamp is sufficient, like Date of Birth.' - ,'coust' - ,'description' - ) - ,'string' -), ( ---------------------------------------- - 'webstaff.format.date_and_time' - ,'gui' - ,oils_i18n_gettext( - 'webstaff.format.date_and_time' - ,'Format Date+Time with this pattern' - ,'coust' - ,'label' - ) - ,oils_i18n_gettext( - 'webstaff.format.date_and_time' - ,'Format Date+Time with this pattern (examples: "yy-MM-dd h:m:s.SSS a" for "16-04-05 2:07:20.666 PM", "yyyy-dd-MMM HH:mm" for "2016-05-Apr 14:07"). This will be used in areas of the client where a date with a timestamp is needed, like Checkout, Due Date, or Record Created.' - ,'coust' - ,'description' - ) - ,'string' -); - -UPDATE - config.org_unit_setting_type -SET - label = 'Deprecated: ' || label -- FIXME: Is this okay? -WHERE - name IN ('format.date','format.time') -; - --- for testing, setting removal: ---DELETE FROM actor.org_unit_setting WHERE name IN ( --- 'webstaff.format.dates' --- ,'webstaff.format.date_and_time' ---); ---DELETE FROM config.org_unit_setting_type_log WHERE field_name IN ( --- 'webstaff.format.dates' --- ,'webstaff.format.date_and_time' ---); ---DELETE FROM config.org_unit_setting_type WHERE name IN ( --- 'webstaff.format.dates' --- ,'webstaff.format.date_and_time' ---); ---UPDATE config.org_unit_setting_type SET label = REPLACE(label,'Deprecated: ','') WHERE name in ('format.date','format.time'); - -COMMIT;