[open-ils-commits] [GIT] Evergreen ILS branch master updated. 65f14d095ffa9b95598974d414e084845c271092

Evergreen Git git at git.evergreen-ils.org
Sun Mar 4 01:39:01 EST 2012


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, master has been updated
       via  65f14d095ffa9b95598974d414e084845c271092 (commit)
      from  c125d5176fa5eaffe8fe927694fb9db9585fe1d9 (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 65f14d095ffa9b95598974d414e084845c271092
Author: Dan Scott <dscott at laurentian.ca>
Date:   Sun Jan 22 14:29:16 2012 -0500

    Fix sorting by pubdate for records migrated to 2.1
    
    The 'pubdate' attribute is necessary for sorting by publication date to
    work correctly. It was not populated in the 2.0-2.1 upgrade script, so
    populate it now based on the 'date1' attribute.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>

diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
index e245c83..0d66ddc 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql
@@ -8927,5 +8927,7 @@ UPDATE  metabib.record_attr
         GROUP BY 1) x
   WHERE x.record = metabib.record_attr.id;
 
-
-
+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/2.1.1-2.1.2-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql
new file mode 100644
index 0000000..301edd4
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql
@@ -0,0 +1,6 @@
+-- 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;

-----------------------------------------------------------------------

Summary of changes:
 .../sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql  |    6 ++++--
 .../Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql  |    6 ++++++
 2 files changed, 10 insertions(+), 2 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list