From: Mike Rylander Date: Tue, 15 Feb 2011 21:11:36 +0000 (-0500) Subject: New tables/classes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=28d5e75b118db1a3531d61f3989e2cb2f6642be4;p=evergreen%2Fequinox.git New tables/classes --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 0f130066c2..baa69550fe 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -1933,6 +1933,42 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm index 39eb01b2ad..e69e1019d5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm @@ -59,6 +59,14 @@ __PACKAGE__->columns( Essential => qw/call_number barcode creator create_date ed age_protect floating cost status_changed_time/ ); #------------------------------------------------------------------------------- +package asset::copy_part_map; +use base qw/asset/; + +__PACKAGE__->table( 'asset_copy_part_map' ); +__PACKAGE__->columns( Primary => qw/target_copy/ ); +__PACKAGE__->columns( Essential => qw/part/); + +#------------------------------------------------------------------------------- package asset::stat_cat; use base qw/asset/; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm index 46fefaab6e..5d104abf6e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm @@ -22,5 +22,13 @@ biblio::record_note->columns( Essential => qw/id record value creator editor create_date edit_date pub/ ); #------------------------------------------------------------------------------- +#------------------------------------------------------------------------------- +package biblio::monograph_part; +use base qw/biblio/; + +biblio::monograph_part->table( 'biblio_monograph_part' ); +biblio::monograph_part->columns( Essential => qw/id record label/ ); +#------------------------------------------------------------------------------- + 1; diff --git a/Open-ILS/src/sql/Pg/010.schema.biblio.sql b/Open-ILS/src/sql/Pg/010.schema.biblio.sql index 428b575481..ce208b2db8 100644 --- a/Open-ILS/src/sql/Pg/010.schema.biblio.sql +++ b/Open-ILS/src/sql/Pg/010.schema.biblio.sql @@ -79,4 +79,11 @@ 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 ); +CREATE TABLE biblio.monograph_part ( + id SERIAL PRIMARY KEY, + record BIGINT NOT NULL REFERENCES biblio.record_entry (id), + label TEXT NOT NULL, + CONSTRAINT record_label_unique UNIQUE (record,label) +); + COMMIT; diff --git a/Open-ILS/src/sql/Pg/040.schema.asset.sql b/Open-ILS/src/sql/Pg/040.schema.asset.sql index cb738963e3..d203ef720a 100644 --- a/Open-ILS/src/sql/Pg/040.schema.asset.sql +++ b/Open-ILS/src/sql/Pg/040.schema.asset.sql @@ -91,6 +91,11 @@ CREATE INDEX cp_editor_idx ON asset.copy ( editor ); CREATE INDEX cp_create_date ON asset.copy (create_date); CREATE RULE protect_copy_delete AS ON DELETE TO asset.copy DO INSTEAD UPDATE asset.copy SET deleted = TRUE WHERE OLD.id = asset.copy.id; +CREATE TABLE asset.copy_part_map ( + target_copy BIGINT PRIMARY KEY, -- points o asset.copy + part INT NOT NULL REFERENCES biblio.monograph_part (id) ON DELETE CASCADE +); + CREATE TABLE asset.opac_visible_copies ( id BIGINT primary key, -- copy id record BIGINT,