[open-ils-commits] r18987 - branches/rel_2_0/Open-ILS/src/sql/Pg (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Dec 13 11:22:22 EST 2010
Author: erickson
Date: 2010-12-13 11:22:19 -0500 (Mon, 13 Dec 2010)
New Revision: 18987
Modified:
branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
Log:
repaired order-by in update_hard_due_dates function to prevent sql errors
Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-12-13 16:16:45 UTC (rev 18986)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-12-13 16:22:19 UTC (rev 18987)
@@ -6383,7 +6383,7 @@
SELECT DISTINCT ON (hard_due_date) *
FROM config.hard_due_date_values
WHERE active_date <= NOW() -- We've passed (or are at) the rollover time
- ORDER BY active_date DESC -- Latest (nearest to us) active time
+ ORDER BY hard_due_date, active_date DESC -- Latest (nearest to us) active time
LOOP
UPDATE config.hard_due_date
SET ceiling_date = temp_value.ceiling_date
More information about the open-ils-commits
mailing list