From ba00fb153001a270f3ec82f3e9aaa7a38f5fe53e Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 20 Jan 2006 18:17:45 +0000 Subject: [PATCH 1/1] circ corner case support; container "public" flag git-svn-id: svn://svn.open-ils.org/ILS/trunk@2765 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 30 ++++++++++++++++++++ Open-ILS/src/sql/Pg/010.schema.biblio.sql | 2 ++ Open-ILS/src/sql/Pg/040.schema.asset.sql | 4 +++ Open-ILS/src/sql/Pg/070.schema.container.sql | 4 +++ Open-ILS/src/sql/Pg/090.schema.action.sql | 17 +++++++++++ 5 files changed, 57 insertions(+) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index e56a4c94bb..be84525d1f 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -146,6 +146,36 @@ INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject' -- INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'subject', 'genre', $$//mods:mods/mods:genre$$ ); INSERT INTO config.metabib_field ( field_class, name, xpath ) VALUES ( 'keyword', 'keyword', $$//mods:mods/*[not(local-name()='originInfo')]$$ ); -- /* to fool vim */ +CREATE TABLE config.non_cataloged_type ( + id SERIAL PRIMARY KEY, + owning_lib INT NOT NULL, -- REFERENCES actor.org_unit (id), + name TEXT NOT NULL UNIQUE +); +COMMENT ON TABLE config.non_cataloged_type IS $$ +/* + * Copyright (C) 2005 Georgia Public Library Service + * Mike Rylander + * + * Types of valid non-cataloged items. + * + * + * **** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +$$; + + +INSERT INTO config.non_cataloged_type ( owning_lib, name ) VALUES ( 1, 'Paperback Book' ); + CREATE TABLE config.identification_type ( id SERIAL PRIMARY KEY, name TEXT NOT NULL UNIQUE diff --git a/Open-ILS/src/sql/Pg/010.schema.biblio.sql b/Open-ILS/src/sql/Pg/010.schema.biblio.sql index f844c3d898..a1f36b4bc5 100644 --- a/Open-ILS/src/sql/Pg/010.schema.biblio.sql +++ b/Open-ILS/src/sql/Pg/010.schema.biblio.sql @@ -40,4 +40,6 @@ CREATE INDEX biblio_record_note_record_idx ON biblio.record_note ( record ); CREATE INDEX biblio_record_note_creator_idx ON biblio.record_note ( creator ); CREATE INDEX biblio_record_note_editor_idx ON biblio.record_note ( editor ); +INSERT INTO biblio.record_entry VALUES (-1,'','AUTOGEN','-1',1,1,NOW(),NOW(),FALSE,FALSE,1,'','FOO'); + COMMIT; diff --git a/Open-ILS/src/sql/Pg/040.schema.asset.sql b/Open-ILS/src/sql/Pg/040.schema.asset.sql index b8ce056e13..7c8347396b 100644 --- a/Open-ILS/src/sql/Pg/040.schema.asset.sql +++ b/Open-ILS/src/sql/Pg/040.schema.asset.sql @@ -36,6 +36,8 @@ CREATE TABLE asset.copy ( ref BOOL NOT NULL DEFAULT FALSE, circ_modifier TEXT, circ_as_type TEXT, + dummy_title TEXT, + dummy_author TEXT, opac_visible BOOL NOT NULL DEFAULT TRUE ); CREATE INDEX cp_cn_idx ON asset.copy (call_number); @@ -124,6 +126,8 @@ CREATE INDEX asset_call_number_editor_idx ON asset.call_number (editor); CREATE INDEX asset_call_number_dewey_idx ON asset.call_number (public.call_number_dewey(label)); CREATE INDEX asset_call_number_upper_label_id_owning_lib_idx ON asset.call_number (upper(label),id,owning_lib); +INSERT INTO asset.call_number VALUES (-1,1,NOW(),1,NOW(),-1,1,'UNCATALOGED'); + CREATE TABLE asset.call_number_note ( id BIGSERIAL PRIMARY KEY, call_number BIGINT NOT NULL, diff --git a/Open-ILS/src/sql/Pg/070.schema.container.sql b/Open-ILS/src/sql/Pg/070.schema.container.sql index 2be13c4968..3df61e1112 100644 --- a/Open-ILS/src/sql/Pg/070.schema.container.sql +++ b/Open-ILS/src/sql/Pg/070.schema.container.sql @@ -13,6 +13,7 @@ CREATE TABLE container.copy_bucket ( INITIALLY DEFERRED, name TEXT NOT NULL, btype TEXT NOT NULL DEFAULT 'misc', + public BOOL NOT NULL DEFAULT FALSE, CONSTRAINT cb_name_once_per_owner UNIQUE (owner,name,btype) ); @@ -46,6 +47,7 @@ CREATE TABLE container.call_number_bucket ( INITIALLY DEFERRED, name TEXT NOT NULL, btype TEXT NOT NULL DEFAULT 'misc', + public BOOL NOT NULL DEFAULT FALSE, CONSTRAINT cnb_name_once_per_owner UNIQUE (owner,name,btype) ); @@ -79,6 +81,7 @@ CREATE TABLE container.biblio_record_entry_bucket ( INITIALLY DEFERRED, name TEXT NOT NULL, btype TEXT NOT NULL DEFAULT 'misc', + public BOOL NOT NULL DEFAULT FALSE, CONSTRAINT breb_name_once_per_owner UNIQUE (owner,name,btype) ); @@ -112,6 +115,7 @@ CREATE TABLE container.user_bucket ( INITIALLY DEFERRED, name TEXT NOT NULL, btype TEXT NOT NULL DEFAULT 'misc', + public BOOL NOT NULL DEFAULT FALSE, CONSTRAINT ub_name_once_per_owner UNIQUE (owner,name,btype) ); diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index f83c605645..26fe0d4396 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -4,6 +4,23 @@ BEGIN; CREATE SCHEMA action; +CREATE TABLE action.in_house_use ( + id SERIAL PRIMARY KEY, + item BIGINT NOT NULL REFERENCES asset.copy (id), + staff INT NOT NULL REFERENCES actor.usr (id), + org_unit INT NOT NULL REFERENCES actor.org_unit (id), + use_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() +); + +CREATE TABLE action.non_cataloged_circulation ( + id SERIAL PRIMARY KEY, + patron INT NOT NULL REFERENCES actor.usr (id), + staff INT NOT NULL REFERENCES actor.usr (id), + circ_lib INT NOT NULL REFERENCES actor.org_unit (id), + item_type INT NOT NULL REFERENCES config.non_cataloged_type (id), + circ_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() +); + CREATE TABLE action.survey ( id SERIAL PRIMARY KEY, owner INT NOT NULL REFERENCES actor.org_unit (id), -- 2.43.2