adding workstation underpinnings
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Feb 2006 21:31:01 +0000 (21:31 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 1 Feb 2006 21:31:01 +0000 (21:31 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2927 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/actor.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/dbi.pm
Open-ILS/src/sql/Pg/005.schema.actors.sql
Open-ILS/src/sql/Pg/080.schema.money.sql

index 8df2155..60bcf52 100644 (file)
@@ -21,6 +21,14 @@ __PACKAGE__->columns( Essential => qw/usrname email first_given_name
                                day_phone evening_phone other_phone mailing_address/ );
 
 #-------------------------------------------------------------------------------
+package actor::workstation;
+use base qw/actor/;
+
+__PACKAGE__->table( 'actor_workstation' );
+__PACKAGE__->columns( Primary => qw/id/);
+__PACKAGE__->columns( Essential => qw/name owning_lib/);
+
+#-------------------------------------------------------------------------------
 package actor::user_standing_penalty;
 use base qw/actor/;
 
index 0f96e0a..021b616 100644 (file)
        biblio::record_note->sequence( 'biblio.record_note_id_seq' );
        
        #---------------------------------------------------------------------
+       package actor::workstation;
+       
+       actor::workstation->table( 'actor.workstation' );
+       actor::workstation->sequence( 'actor.workstation_id_seq' );
+
+       #---------------------------------------------------------------------
        package actor::user;
        
        actor::user->table( 'actor.usr' );
index 732e60e..fd5ed10 100644 (file)
@@ -378,6 +378,13 @@ INSERT INTO actor.org_unit (parent_ou, ou_type, shortname, name) VALUES (3, 3, '
 INSERT INTO actor.org_unit (parent_ou, ou_type, shortname, name) VALUES (4, 4, 'SL1', 'Example Sub-lib 1');
 INSERT INTO actor.org_unit (parent_ou, ou_type, shortname, name) VALUES (6, 5, 'BM1', 'Example Bookmobile 1');
 
+-- Workstation registration...
+CREATE TABLE actor.workstation (
+       id              SERIAL  PRIMARY KEY,
+       name            TEXT    NOT NULL UNIQUE,
+       owning_lib      INT     NOT NULL REFERENCES actor.org_unit (id)
+);
+
 CREATE TABLE actor.org_unit_setting (
        id              BIGSERIAL       PRIMARY KEY,
        org_unit        INT             NOT NULL REFERENCES actor.org_unit ON DELETE CASCADE,
index 22e8437..d3458ff 100644 (file)
@@ -204,18 +204,20 @@ CREATE INDEX money_credit_payment_xact_idx ON money.credit_payment (xact);
 CREATE INDEX money_credit_payment_accepting_usr_idx ON money.credit_payment (accepting_usr);
 
 CREATE TABLE money.bnm_desk_payment (
-       cash_drawer     TEXT    NOT NULL
+       cash_drawer     INT     REFERENCES actor.workstation (id)
 ) INHERITS (money.bnm_payment);
 
 CREATE TABLE money.cash_payment () INHERITS (money.bnm_desk_payment);
 CREATE INDEX money_cash_payment_xact_idx ON money.cash_payment (xact);
 CREATE INDEX money_cash_payment_accepting_usr_idx ON money.cash_payment (accepting_usr);
+CREATE INDEX money_cash_payment_cash_drawer_idx ON money.cash_payment (cash_drawer);
 
 CREATE TABLE money.check_payment (
        check_number    TEXT    NOT NULL
 ) INHERITS (money.bnm_desk_payment);
 CREATE INDEX money_check_payment_xact_idx ON money.check_payment (xact);
 CREATE INDEX money_check_payment_accepting_usr_idx ON money.check_payment (accepting_usr);
+CREATE INDEX money_check_payment_cash_drawer_idx ON money.check_payment (cash_drawer);
 
 CREATE TABLE money.credit_card_payment (
        cc_type         TEXT    NOT NULL,
@@ -226,6 +228,7 @@ CREATE TABLE money.credit_card_payment (
 ) INHERITS (money.bnm_desk_payment);
 CREATE INDEX money_credit_card_payment_xact_idx ON money.credit_card_payment (xact);
 CREATE INDEX money_credit_card_payment_accepting_usr_idx ON money.credit_card_payment (accepting_usr);
+CREATE INDEX money_credit_card_payment_cash_drawer_idx ON money.credit_card_payment (cash_drawer);
 
 
 COMMIT;