From ef7234f385b259008f580594aa37e1034329b7c6 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 14 May 2008 16:57:04 +0000 Subject: [PATCH] moving purpose to record instead of queue git-svn-id: svn://svn.open-ils.org/ILS/trunk@9600 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 3 ++- Open-ILS/src/sql/Pg/012.schema.vandelay.sql | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 2ae70c959d..8fbbf52f51 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -146,7 +146,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - @@ -173,6 +172,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + @@ -298,6 +298,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + diff --git a/Open-ILS/src/sql/Pg/012.schema.vandelay.sql b/Open-ILS/src/sql/Pg/012.schema.vandelay.sql index cd0599393a..5cdb1ceefe 100644 --- a/Open-ILS/src/sql/Pg/012.schema.vandelay.sql +++ b/Open-ILS/src/sql/Pg/012.schema.vandelay.sql @@ -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); -- 2.43.2