Track import time and target copy on import items
authorberick <berick@esilibrary.com>
Fri, 20 May 2011 21:06:05 +0000 (17:06 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 6 Jul 2011 18:50:53 +0000 (14:50 -0400)
Added import_time and imported_as columns to vandelay.import_item

For you branch trackers:

ALTER TABLE vandelay.import_item
    ADD import_time TIMESTAMP WITH TIME ZONE;

ALTER TABLE vandelay.import_item
    ADD imported_as BIGINT REFERENCES
    asset.copy (id) DEFERRABLE INITIALLY DEFERRED;

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/012.schema.vandelay.sql

index 06cf384..27cdcd7 100644 (file)
@@ -189,6 +189,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
                        <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
                        <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
+                       <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
+                       <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
                        <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
                        <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
                        <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
@@ -213,6 +215,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
                        <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
                        <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
+                       <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
index d461d4f..9a5c3ef 100644 (file)
@@ -153,6 +153,8 @@ CREATE TABLE vandelay.import_item (
     definition      BIGINT      NOT NULL REFERENCES vandelay.import_item_attr_definition (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
        import_error    TEXT        REFERENCES vandelay.import_error (code) ON DELETE SET NULL ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
        error_detail    TEXT,
+    imported_as     BIGINT      REFERENCES asset.copy (id) DEFERRABLE INITIALLY DEFERRED,
+    import_time            TIMESTAMP WITH TIME ZONE,
     owning_lib      INT,
     circ_lib        INT,
     call_number     TEXT,