<field reporter:label="Item" name="item" reporter:datatype="int" />
<field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
<field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
+ <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
<field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
</fields>
<links>
<link field="item" reltype="has_a" key="id" map="" class="acp"/>
<link field="staff" reltype="has_a" key="id" map="" class="au"/>
+ <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
<link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
<field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
<field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
<field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
+ <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
<field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
</fields>
<links>
<link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
<link field="staff" reltype="has_a" key="id" map="" class="au"/>
+ <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
<link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
</links>
<permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
}
$ihu->staff($e->requestor->id);
+ $ihu->workstation($e->requestor->wsid);
$ihu->org_unit($org);
$ihu->use_time($use_time);
action::in_house_use->has_a( org_unit => 'actor::org_unit' );
action::in_house_use->has_a( staff => 'actor::user' );
+ action::in_house_use->has_a( workstation => 'actor::workstation' );
action::in_house_use->has_a( item => 'asset::copy' );
action::non_cataloged_circulation->has_a( circ_lib => 'actor::org_unit' );
use base qw/action/;
__PACKAGE__->table('action_in_house_use');
__PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/item staff org_unit use_time/);
+__PACKAGE__->columns(Essential => qw/item staff workstation org_unit use_time/);
#-------------------------------------------------------------------------------
package action::non_cat_in_house_use;
use base qw/action/;
__PACKAGE__->table('action_non_cat_in_house_use');
__PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/item_type staff org_unit use_time/);
+__PACKAGE__->columns(Essential => qw/item_type staff workstation org_unit use_time/);
#-------------------------------------------------------------------------------
package action::non_cataloged_circulation;
id SERIAL PRIMARY KEY,
item BIGINT NOT NULL, -- REFERENCES asset.copy (id) DEFERRABLE INITIALLY DEFERRED, -- XXX could be an serial.issuance
staff INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
+ workstation INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED,
org_unit INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
use_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
CREATE INDEX action_in_house_use_staff_idx ON action.in_house_use ( staff );
+CREATE INDEX action_in_house_use_ws_idx ON action.in_house_use ( workstation );
CREATE TABLE action.non_cataloged_circulation (
id SERIAL PRIMARY KEY,
id SERIAL PRIMARY KEY,
item_type BIGINT NOT NULL REFERENCES config.non_cataloged_type(id) DEFERRABLE INITIALLY DEFERRED,
staff INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
+ workstation INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED,
org_unit INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
use_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
CREATE INDEX non_cat_in_house_use_staff_idx ON action.non_cat_in_house_use ( staff );
+CREATE INDEX non_cat_in_house_use_ws_idx ON action.non_cat_in_house_use ( workstation );
CREATE TABLE action.survey (
id SERIAL PRIMARY KEY,
--- /dev/null
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE action.in_house_use ADD COLUMN workstation INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE action.non_cat_in_house_use ADD COLUMN workstation INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;