From: miker Date: Wed, 29 Jun 2005 19:55:21 +0000 (+0000) Subject: "copy" conficts with CDBI, renaming to target_copy X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0479516872fd758cd5168c393e479196b24fee68;p=Evergreen.git "copy" conficts with CDBI, renaming to target_copy git-svn-id: svn://svn.open-ils.org/ILS/trunk@976 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm index 0fd5291c74..ab24c701b4 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm @@ -444,7 +444,7 @@ sub modify_from_fieldmapper { action::hold_notification->has_a( hold => 'action::hold_request' ); action::hold_copy_map->has_a( hold => 'action::hold_request' ); - action::hold_copy_map->has_a( copy => 'asset::copy' ); + action::hold_copy_map->has_a( target_copy => 'asset::copy' ); action::hold_request->has_a( current_copy => 'asset::copy' ); action::hold_request->has_a( requestor => 'actor::user' ); diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm index eafaa19e11..9e0485eaa7 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm @@ -73,7 +73,7 @@ package action::hold_copy_map; use base qw/action/; __PACKAGE__->table('action_hold_copy_map'); __PACKAGE__->columns(Primary => 'id'); -__PACKAGE__->columns(Essential => qw/hold copy/); +__PACKAGE__->columns(Essential => qw/hold target_copy/); #------------------------------------------------------------------------------- diff --git a/Open-ILS/src/sql/Postgres/090.schema.action.sql b/Open-ILS/src/sql/Postgres/090.schema.action.sql index 3fa384f94f..3b08f56c40 100644 --- a/Open-ILS/src/sql/Postgres/090.schema.action.sql +++ b/Open-ILS/src/sql/Postgres/090.schema.action.sql @@ -100,9 +100,9 @@ CREATE TABLE action.hold_notification ( ); CREATE TABLE action.hold_copy_map ( - id SERIAL PRIMARY KEY, - hold INT NOT NULL REFERENCES action.hold_notification (id) ON DELETE CASCADE, - copy BIGINT NOT NULL REFERENCES asset.copy (id) ON DELETE CASCADE, + id SERIAL PRIMARY KEY, + hold INT NOT NULL REFERENCES action.hold_notification (id) ON DELETE CASCADE, + target_copy BIGINT NOT NULL REFERENCES asset.copy (id) ON DELETE CASCADE, CONSTRAINT copy_once_per_hold UNIQUE (hold,copy) );