beginnings of new method of version upgrade scripts user/csharp/new_version_upgrades
authorChris Sharp <csharp@georgialibraries.org>
Mon, 18 Feb 2013 20:43:30 +0000 (15:43 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 18 Feb 2013 20:43:30 +0000 (15:43 -0500)
Open-ILS/src/sql/Pg/run_sql_from_filelist.sh [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/2.1.1-2.1.2-extra-commands.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1-2.2.0-upgrade-db.list [new file with mode: 0644]
Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1.1-2.1.2-upgrade-db.list [new file with mode: 0644]
Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1.2-2.1.3-upgrade-db.list [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/run_sql_from_filelist.sh b/Open-ILS/src/sql/Pg/run_sql_from_filelist.sh
new file mode 100644 (file)
index 0000000..6be3822
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+ADMIN_EMAIL="admin@example.org"
+FILE_LIST="$1"
+EG_VERSION="$2"
+SQL_DIR="/root/pines/Open-ILS/src/sql/Pg/upgrade"
+DATABASE_NAME="evergreen"
+SET_VARIABLE="'''$EG_VERSION'''"
+
+if [ -z $FILE_LIST ]; then
+echo "Usage: $0 <filename> <eg_version>" && exit
+fi
+
+for i in `cat $FILE_LIST`;
+do time PGUSER=postgres psql -v eg_version=$SET_VARIABLE -f $SQL_DIR/$i $DATABASE_NAME;
+done
+
+echo "File list $FILE_LIST completed at `date`." | mutt -s "SQL File Processed" $ADMIN_EMAIL
+
diff --git a/Open-ILS/src/sql/Pg/upgrade/2.1.1-2.1.2-extra-commands.sql b/Open-ILS/src/sql/Pg/upgrade/2.1.1-2.1.2-extra-commands.sql
new file mode 100644 (file)
index 0000000..7c3069c
--- /dev/null
@@ -0,0 +1,7 @@
+-- Fix sorting by pubdate by ensuring migrated records
+-- have a pubdate attribute in metabib.record_attr.attrs
+UPDATE metabib.record_attr
+   SET attrs = attrs || ('pubdate' => (attrs->'date1'))
+   WHERE defined(attrs, 'pubdate') IS FALSE
+   AND defined(attrs, 'date1') IS TRUE;
+
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1-2.2.0-upgrade-db.list b/Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1-2.2.0-upgrade-db.list
new file mode 100644 (file)
index 0000000..30305fe
--- /dev/null
@@ -0,0 +1,115 @@
+0526.schema.upgrade-dep-tracking.sql
+0536.schema.lazy_circ-barcode_lookup.sql
+0537.schema.upgrade-dep-tracking-fix.sql
+0544.data.patron_no_collections.sql
+0545.data.abort_transit_perms.sql
+0546.schema.sip_statcats.sql
+0548.data.perm_list_cleanup_pt_2.sql
+0549.data.transit-checkin-interval.sql
+0550.data.patron_opt_in_settings.sql
+0562.schema.copy_active_date.sql
+0564.data.org-setting-cat.volume.delete_on_empty.sql
+0565.schema.action-trigger.event_definition.hold-cancel-no-target-notification.sql
+0567.data.ou_setting_generate_overdue_on_lost.sql
+0572.schema.vandelay-record-matching-and-quality.sql
+0574.data.hold_pull_list_template.sql
+0575.schema.authority-control-sets.sql
+0577.schema.vandelay-item-import-copy-loc-ancestors.sql
+0584.data.org-setting-ui.circ.billing.uncheck_bills_and_unfocus_payment_box.sql
+0585.checkout_fills_related_hold_exact_match.sql
+0586.data.persistent_login_default_perm.sql
+0593.data.org-setting-circ.offline.skip_foo_if_newer_status_changed_time.sql
+0594.schema.acp_status_date_changed.sql
+0595.data.org-setting-ui.patron_search.result_cap.sql
+0596.schema.vandelay-item-import-error-detail.sql
+0597.schema.vandelay.bib_match_isxn_caseless.sql
+0598.schema.vandelay_one_match_per.sql
+0606.schema.czs_use_perm_column.sql
+0608.data.vandelay-export-error-match-info.sql
+0609.schema.acq-lineitem-detail-receiver.sql
+0610.data.acq-copy-creator-from-receiver.sql
+0611.data.magic_macros.sql
+0612.schema.authority_overlay_protection.sql
+0613.schema.vandelay_isxn_normalization.sql
+0615.schema.generic-mapping-index-normalizer.sql
+0616.schema.actor_org_unit_trigger_prox_update.sql
+0617.schema.add-reservation-email-notify.sql
+0618.data.org-setting-phone_pw.sql
+0619.schema.au_last_update_time.sql
+0621.data.opac_payment_history_age_limit.sql
+0622.data.YAOUS-i18n-update.sql
+0623.schema.YAOUS-log-table.sql
+0625.data.opac_staff_saved_search_size.sql
+0626.schema.bookbag-goodies.sql
+0627.data.patron-password-reset-msg.sql
+0630.data.suppress_transits.sql
+0632.data.username-limit-settings.sql
+0635.data.opac.jump-to-details-setting.sql
+0636.data.grace_period_extend.sql
+0640.schema-acs-nfi.sql
+0641.schema.org_unit_setting_json_check.sql
+0642.data.acq-worksheet-hold-count.sql
+0643.data.populate_authority_simple_heading.sql
+0644.data.YAOUS-target-when-closed.sql
+0647.data.hold-notification-cleanup-mod.sql
+0651.schema.unnest-hold-permit-upgrade-script-repair.sql
+0652.data.vandelay-queue-bib-bucket-type.sql
+0653.schema.unapi-indb-optional-org.sql
+0654.patron_card_editor.sql
+0655.config.bib_source.can_have_copies.sql
+0656.LP893315_schema.function.filter_deleted_acns_from_unapi.holdings_xml.sql
+0657.schema.address-alert.sql
+0659.add_create_report_perms.sql
+0660.data.bib-container-csv-unapi-template.sql
+0661.data.yaous-opac-tag-circed-items.sql
+0662.schema.coded-value-map-index-normalizer.sql
+0663.schema.archive_circ_stat_cats.sql
+0664.schema.hold-current-shelf-lib.sql
+0666.schema.sms_carriers.sql
+0667.schema.alerting-penalties.sql
+0668.schema.fix_indb_hold_permit.sql
+0669.data.recall_and_force_holds.sql
+0670.data.mark-email-and-phone-invalid.sql
+0671.schema.copy_location_alert.sql
+0673.data.acq-cancel-reason-cleanup.sql
+0674.config.copy_status.restrict_copy_delete.sql
+0675.schema.usr_visible_circ_copies_row_estimates.sql
+0676.schema.bib_autosuggest.sql
+0677.schema.circ_limits.sql
+0678.data.vandelay-default-merge-profiles.sql
+0681.schema.user-activity.sql
+0682.schema.copy_loc_search_groups.sql
+0683.hold_available_email_notify.sql
+0684.schema.acq-vandelay-integration.sql
+0685.data.bluray_vr_format.sql
+0686.schema.auditor_boost.sql
+0687.schema.enhance_reingest.sql
+0711.schema.reingest_avoid_collision_better.sql
+0688.data.circ_history_export_csv.sql
+0689.data.record_print_format_update.sql
+0690.schema.unapi_limit_rank.sql
+0692.data.fine-when-closed.sql
+0694.schema.patron_reg_prefix.sql
+0695.schema.custom_toolbars.sql
+0696.no_plperl.sql
+0697.data.place_currently_unfillable_hold.sql
+0698.hold_default_pickup.sql
+0699.data.org-setting-ui.hide_copy_editor_fields.sql
+0700.schema.serial-holding-groups.sql
+0706.schema.serial-holding-code-constraint.sql
+0710.schema.stricter-could-be-holding-code.sql
+0701.schema.patron_stat_category_enhancements.sql
+0702.schema.org_unit_opac_vis_and_sorting.sql
+0704.schema.query_parser_fts.sql
+0705.data.custom-org-tree-perms.sql
+0707.data.vandelay_perms_etc.sql
+0708.data.fix_inheritied_typo.sql
+0709.data.misc_missing_perms.sql
+0715.data.add_acq_config_group.sql
+0716.coded_value_map_id_seq_fix.sql
+0717.data.safer-control-set-defaults.sql
+0672.fix-nonfiling-titles.sql
+0679.schema.autosuggest.search-normalize.sql
+0680.schema.autosuggest-big_data-speedup.sql
+0693.schema.do_not_despace_issns.sql
+0691.schema.acq_fk_indices.sql
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1.1-2.1.2-upgrade-db.list b/Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1.1-2.1.2-upgrade-db.list
new file mode 100644 (file)
index 0000000..0995802
--- /dev/null
@@ -0,0 +1,5 @@
+0559.schema.biblio.extract_located_uris.sql
+0658.schema.acn_dewey_sort_fix.sql
+0693.schema.do_not_despace_issns.sql
+0691.schema.acq_fk_indices.sql
+2.1.1-2.1.2-extra-commands.sql
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1.2-2.1.3-upgrade-db.list b/Open-ILS/src/sql/Pg/version-upgrade/conglomerated/2.1.2-2.1.3-upgrade-db.list
new file mode 100644 (file)
index 0000000..5dfd95d
--- /dev/null
@@ -0,0 +1,2 @@
+0722.schema.acq-po-state-constraint.sql
+0726.schema.fix_maintain_901_regex.sql