repaired order-by in update_hard_due_dates function to prevent sql errors
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Dec 2010 16:22:19 +0000 (16:22 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Dec 2010 16:22:19 +0000 (16:22 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@18987 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql

index ed2f588..d8c2732 100644 (file)
@@ -6383,7 +6383,7 @@ BEGIN
       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