]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/901.audit-tables.sql
Wrap upgrade script for 0840 circulation column picker.
[working/Evergreen.git] / Open-ILS / src / sql / Pg / 901.audit-tables.sql
1 /*
2  * Copyright (C) 2004-2008  Georgia Public Library Service
3  * Copyright (C) 2007-2008  Equinox Software, Inc.
4  * Mike Rylander <miker@esilibrary.com> 
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  */
17
18 BEGIN;
19
20 SELECT auditor.create_auditor ( 'actor', 'usr' );
21 CREATE INDEX aud_actor_usr_hist_id_idx            ON auditor.actor_usr_history ( id );
22
23 SELECT auditor.create_auditor ( 'actor', 'usr_address' );
24 CREATE INDEX aud_actor_usr_address_hist_id_idx    ON auditor.actor_usr_address_history ( id );
25
26 SELECT auditor.create_auditor ( 'actor', 'org_unit' );
27
28 SELECT auditor.create_auditor ( 'biblio', 'record_entry' );
29 CREATE INDEX aud_bib_rec_entry_hist_creator_idx   ON auditor.biblio_record_entry_history ( creator );
30 CREATE INDEX aud_bib_rec_entry_hist_editor_idx    ON auditor.biblio_record_entry_history ( editor );
31
32 SELECT auditor.create_auditor ( 'asset', 'call_number' );
33 CREATE INDEX aud_asset_cn_hist_creator_idx        ON auditor.asset_call_number_history ( creator );
34 CREATE INDEX aud_asset_cn_hist_editor_idx         ON auditor.asset_call_number_history ( editor );
35
36 SELECT auditor.create_auditor ( 'asset', 'copy' );
37 CREATE INDEX aud_asset_cp_hist_creator_idx        ON auditor.asset_copy_history ( creator );
38 CREATE INDEX aud_asset_cp_hist_editor_idx         ON auditor.asset_copy_history ( editor );
39 SELECT auditor.create_auditor ( 'serial', 'unit' );
40 CREATE INDEX aud_serial_unit_hist_creator_idx     ON auditor.serial_unit_history ( creator );
41 CREATE INDEX aud_serial_unit_hist_editor_idx      ON auditor.serial_unit_history ( editor );
42
43 SELECT auditor.create_auditor ( 'acq', 'invoice' );
44
45 SELECT auditor.create_auditor ( 'acq', 'invoice_item' );
46
47 SELECT auditor.create_auditor ( 'acq', 'invoice_entry' );
48
49 COMMIT;
50