moving purpose to record instead of queue
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 May 2008 16:57:04 +0000 (16:57 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 May 2008 16:57:04 +0000 (16:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9600 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 2ae70c9..8fbbf52 100644 (file)
@@ -146,7 +146,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Name" name="name" oils_obj:array_position="5" oils_persist:virtual="false" reporter:datatype="text" oils_persist:i18n="true"/>
                        <field reporter:label="Complete" name="complete" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="bool"/>
                        <field reporter:label="Type" name="queue_type" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="text"/>
-                       <field reporter:label="Purpose" name="queue_purpose" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="text"/>
                </fields>
                <links>
                        <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
@@ -173,6 +172,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Queue" name="queue" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="link"/>
                        <field reporter:label="Bib Source" name="bib_source" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="link"/>
                        <field reporter:label="Final Target Record" name="imported_as" oils_obj:array_position="9" oils_persist:virtual="false" reporter:datatype="link"/>
+                       <field reporter:label="Purpose" name="purpose" oils_obj:array_position="10" oils_persist:virtual="false" reporter:datatype="text"/>
                </fields>
                <links>
                        <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
@@ -298,6 +298,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="MARC" name="marc" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="text"/>
                        <field reporter:label="Queue" name="queue" oils_obj:array_position="7" oils_persist:virtual="false" reporter:datatype="link"/>
                        <field reporter:label="Final Target Record" name="imported_as" oils_obj:array_position="8" oils_persist:virtual="false" reporter:datatype="link"/>
+                       <field reporter:label="Purpose" name="purpose" oils_obj:array_position="9" oils_persist:virtual="false" reporter:datatype="text"/>
                </fields>
                <links>
                        <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
index cd05993..5cdb1ce 100644 (file)
@@ -10,15 +10,15 @@ CREATE TABLE vandelay.queue (
        name                    TEXT            NOT NULL,
        complete                BOOL            NOT NULL DEFAULT FALSE,
        queue_type              TEXT            NOT NULL DEFAULT 'bib' CHECK (queue_type IN ('bib','authority')),
-       queue_purpose   TEXT            NOT NULL DEFAULT 'import' CHECK (queue_purpose IN ('import','overlay')),
        CONSTRAINT vand_queue_name_once_per_owner_const UNIQUE (owner,name,queue_type)
 );
 
 CREATE TABLE vandelay.queued_record (
-    id                  BIGSERIAL                   PRIMARY KEY,
-    create_time         TIMESTAMP WITH TIME ZONE    NOT NULL DEFAULT NOW(),
-    import_time         TIMESTAMP WITH TIME ZONE,
-    marc                TEXT                        NOT NULL
+    id                 BIGSERIAL                   PRIMARY KEY,
+    create_time        TIMESTAMP WITH TIME ZONE    NOT NULL DEFAULT NOW(),
+    import_time        TIMESTAMP WITH TIME ZONE,
+       purpose         TEXT                                            NOT NULL DEFAULT 'import' CHECK (queue_purpose IN ('import','overlay')),
+    marc               TEXT                        NOT NULL
 );
 
 
@@ -57,9 +57,9 @@ CREATE TABLE vandelay.bib_queue (
 ALTER TABLE vandelay.bib_queue ADD PRIMARY KEY (id);
 
 CREATE TABLE vandelay.queued_bib_record (
-       queue           INT     NOT NULL REFERENCES vandelay.bib_queue (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
-       bib_source      INT     REFERENCES config.bib_source (id) DEFERRABLE INITIALLY DEFERRED,
-       imported_as     INT     REFERENCES biblio.record_entry (id) DEFERRABLE INITIALLY DEFERRED
+       queue           INT             NOT NULL REFERENCES vandelay.bib_queue (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
+       bib_source      INT             REFERENCES config.bib_source (id) DEFERRABLE INITIALLY DEFERRED,
+       imported_as     INT             REFERENCES biblio.record_entry (id) DEFERRABLE INITIALLY DEFERRED
 ) INHERITS (vandelay.queued_record);
 ALTER TABLE vandelay.queued_bib_record ADD PRIMARY KEY (id);