LP1714589: Use Explicit Definition for aacs
authorJason Boyer <JBoyer@library.in.gov>
Fri, 1 Sep 2017 21:09:36 +0000 (17:09 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 5 Sep 2017 19:50:24 +0000 (15:50 -0400)
Spell out the expected fields in the expected order
for the aacs view because databases that have undergone
upgrades may drift when using * in a UNION.

Signed-off-by: <JBoyer@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/upgrade/1051.schema.all-circs-slim.sql

index 71c22f1..5a41275 100644 (file)
@@ -3,7 +3,40 @@ BEGIN;
 SELECT evergreen.upgrade_deps_block_check('1051', :eg_version);
 
 CREATE OR REPLACE VIEW action.all_circulation_slim AS
-    SELECT * FROM action.circulation
+    SELECT
+        id,
+        usr,
+        xact_start,
+        xact_finish,
+        unrecovered,
+        target_copy,
+        circ_lib,
+        circ_staff,
+        checkin_staff,
+        checkin_lib,
+        renewal_remaining,
+        grace_period,
+        due_date,
+        stop_fines_time,
+        checkin_time,
+        create_time,
+        duration,
+        fine_interval,
+        recurring_fine,
+        max_fine,
+        phone_renewal,
+        desk_renewal,
+        opac_renewal,
+        duration_rule,
+        recurring_fine_rule,
+        max_fine_rule,
+        stop_fines,
+        workstation,
+        checkin_workstation,
+        copy_location,
+        checkin_scan_time,
+        parent_circ
+    FROM action.circulation
 UNION ALL
     SELECT
         id,