PINES doesn't have auditor.serial_unit_history, so we create it
authorChris Sharp <csharp@georgialibraries.org>
Fri, 17 Aug 2012 14:13:16 +0000 (10:13 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 16 Feb 2013 13:24:17 +0000 (08:24 -0500)
Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql

index 8c88ab3..ba089c2 100644 (file)
@@ -538,8 +538,13 @@ ALTER TABLE asset.copy
 ALTER TABLE auditor.asset_copy_history
     ADD COLUMN active_date TIMESTAMP WITH TIME ZONE;
 
-ALTER TABLE auditor.serial_unit_history
-    ADD COLUMN active_date TIMESTAMP WITH TIME ZONE;
+-- PINES doesn't have this table, so we create it from scratch
+-- ALTER TABLE auditor.serial_unit_history
+--    ADD COLUMN active_date TIMESTAMP WITH TIME ZONE;
+
+SELECT auditor.create_auditor ( 'serial', 'unit' );
+CREATE INDEX aud_serial_unit_hist_creator_idx     ON auditor.serial_unit_history ( creator );
+CREATE INDEX aud_serial_unit_hist_editor_idx      ON auditor.serial_unit_history ( editor );
 
 ALTER TABLE config.copy_status
     ADD COLUMN copy_active BOOL NOT NULL DEFAULT FALSE;