[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. 2e417b99130665dfc2c31e10f6b2c9f227e6c946
Evergreen Git
git at git.evergreen-ils.org
Thu Aug 22 10:25:20 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_3 has been updated
via 2e417b99130665dfc2c31e10f6b2c9f227e6c946 (commit)
from 3ca227fe857467d8007a895444dca0ab346f89f0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2e417b99130665dfc2c31e10f6b2c9f227e6c946
Author: Bill Erickson <berick at esilibrary.com>
Date: Thu Aug 22 10:24:57 2013 -0400
Propagating 2.3.10 DB upgrade script
Signed-off-by: Bill Erickson <berick at esilibrary.com>
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.3.9-2.3.10-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.3.9-2.3.10-upgrade-db.sql
new file mode 100644
index 0000000..b92e91c
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.3.9-2.3.10-upgrade-db.sql
@@ -0,0 +1,75 @@
+--Upgrade Script for 2.3.9 to 2.3.10
+\set eg_version '''2.3.10'''
+BEGIN;
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.3.10', :eg_version);
+
+SELECT evergreen.upgrade_deps_block_check('0818', :eg_version);
+
+INSERT INTO config.org_unit_setting_type ( name, grp, label, description, datatype ) VALUES (
+ 'circ.patron_edit.duplicate_patron_check_depth', 'circ',
+ oils_i18n_gettext(
+ 'circ.patron_edit.duplicate_patron_check_depth',
+ 'Specify search depth for the duplicate patron check in the patron editor',
+ 'coust',
+ 'label'),
+ oils_i18n_gettext(
+ 'circ.patron_edit.duplicate_patron_check_depth',
+ 'When using the patron registration page, the duplicate patron check will use the configured depth to scope the search for duplicate patrons.',
+ 'coust',
+ 'description'),
+ 'integer')
+;
+
+
+
+-- Evergreen DB patch 0819.schema.acn_dewey_normalizer.sql
+--
+-- Fixes Dewey call number sorting (per LP# 1150939)
+--
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0819', :eg_version);
+
+CREATE OR REPLACE FUNCTION asset.label_normalizer_dewey(TEXT) RETURNS TEXT AS $func$
+ # Derived from the Koha C4::ClassSortRoutine::Dewey module
+ # Copyright (C) 2007 LibLime
+ # Licensed under the GPL v2 or later
+
+ use strict;
+ use warnings;
+
+ my $init = uc(shift);
+ $init =~ s/^\s+//;
+ $init =~ s/\s+$//;
+ $init =~ s!/!!g;
+ $init =~ s/^([\p{IsAlpha}]+)/$1 /;
+ my @tokens = split /\.|\s+/, $init;
+ my $digit_group_count = 0;
+ my $first_digit_group_idx;
+ for (my $i = 0; $i <= $#tokens; $i++) {
+ if ($tokens[$i] =~ /^\d+$/) {
+ $digit_group_count++;
+ if ($digit_group_count == 1) {
+ $first_digit_group_idx = $i;
+ }
+ if (2 == $digit_group_count) {
+ $tokens[$i] = sprintf("%-15.15s", $tokens[$i]);
+ $tokens[$i] =~ tr/ /0/;
+ }
+ }
+ }
+ # Pad the first digit_group if there was only one
+ if (1 == $digit_group_count) {
+ $tokens[$first_digit_group_idx] .= '_000000000000000'
+ }
+ my $key = join("_", @tokens);
+ $key =~ s/[^\p{IsAlnum}_]//g;
+
+ return $key;
+
+$func$ LANGUAGE PLPERLU;
+
+-- regenerate sort keys for any dewey call numbers
+UPDATE asset.call_number SET id = id WHERE label_class = 2;
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
.../Pg/version-upgrade/2.3.9-2.3.10-upgrade-db.sql | 75 ++++++++++++++++++++
1 files changed, 75 insertions(+), 0 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/version-upgrade/2.3.9-2.3.10-upgrade-db.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list