updating money.bnm_desk_payment.cash_drawer (fkey to actor.workstation.id) and hold_r...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Mar 2006 15:43:26 +0000 (15:43 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Mar 2006 15:43:26 +0000 (15:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3341 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm
Open-ILS/src/sql/Pg/090.schema.action.sql

index 3ddcb7b..bbc2881 100644 (file)
@@ -98,7 +98,7 @@ package action::hold_notification;
 use base qw/action/;
 __PACKAGE__->table('action_hold_notification');
 __PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/hold method notify_time note/);
+__PACKAGE__->columns(Essential => qw/hold method notify_time note notify_staff/);
 
 #-------------------------------------------------------------------------------
 
index b37dc80..4e013a2 100644 (file)
@@ -165,17 +165,19 @@ CREATE TABLE action.hold_request (
        hold_type               "char"                          NOT NULL CHECK (hold_type IN ('M','T','V','C')),
        holdable_formats        TEXT,
        phone_notify            TEXT,
-       email_notify            TEXT
+       email_notify            BOOL                            NOT NULL DEFAULT TRUE
 );
 
 
 CREATE TABLE action.hold_notification (
        id              SERIAL                          PRIMARY KEY,
        hold            INT                             NOT NULL REFERENCES action.hold_request (id),
+       notify_staff    INT                             REFERENCES actor.usr (id),
        notify_time     TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT NOW(),
-       method          TEXT                            NOT NULL, -- eh...
+       method          TEXT                            NOT NULL, -- email address or phone number
        note            TEXT
 );
+CREATE INDEX ahn_hold_idx ON action.hold_notification (hold);
 
 CREATE TABLE action.hold_copy_map (
        id              SERIAL  PRIMARY KEY,
@@ -183,6 +185,8 @@ CREATE TABLE action.hold_copy_map (
        target_copy     BIGINT  NOT NULL REFERENCES asset.copy (id) ON DELETE CASCADE,
        CONSTRAINT copy_once_per_hold UNIQUE (hold,target_copy)
 );
+-- CREATE INDEX acm_hold_idx ON action.hold_copy_map (hold);
+CREATE INDEX acm_copy_idx ON action.hold_copy_map (target_copy);
 
 CREATE TABLE action.transit_copy (
        id                      SERIAL                          PRIMARY KEY,