[open-ils-commits] [GIT] Evergreen ILS branch master updated. 38e65097b64be3cd141c6807655bf570fc9bc094
Evergreen Git
git at git.evergreen-ils.org
Tue May 24 16:59:16 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 38e65097b64be3cd141c6807655bf570fc9bc094 (commit)
from ebc5ae668ef598f59f25e4fb0a9ef258074d0d9b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 38e65097b64be3cd141c6807655bf570fc9bc094
Author: Dan Wells <dbw2 at calvin.edu>
Date: Tue May 24 16:55:47 2011 -0400
Bring serial.unit in line with asset.copy
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 2879923..1b9890e 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0538', :eg_version); -- senator
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0540', :eg_version); -- dbwells
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/210.schema.serials.sql b/Open-ILS/src/sql/Pg/210.schema.serials.sql
index 56f6f54..9b884b6 100644
--- a/Open-ILS/src/sql/Pg/210.schema.serials.sql
+++ b/Open-ILS/src/sql/Pg/210.schema.serials.sql
@@ -225,6 +225,11 @@ CREATE TRIGGER autogenerate_placeholder_barcode
FOR EACH ROW EXECUTE PROCEDURE asset.autogenerate_placeholder_barcode()
;
+-- must create this trigger explicitly; it is not inherited from asset.copy
+CREATE TRIGGER sunit_status_changed_trig
+ BEFORE UPDATE ON serial.unit
+ FOR EACH ROW EXECUTE PROCEDURE asset.acp_status_changed();
+
CREATE TABLE serial.item (
id SERIAL PRIMARY KEY,
creator INT NOT NULL
diff --git a/Open-ILS/src/sql/Pg/901.audit-tables.sql b/Open-ILS/src/sql/Pg/901.audit-tables.sql
index 56aabe2..72980ee 100644
--- a/Open-ILS/src/sql/Pg/901.audit-tables.sql
+++ b/Open-ILS/src/sql/Pg/901.audit-tables.sql
@@ -36,6 +36,9 @@ CREATE INDEX aud_asset_cn_hist_editor_idx ON auditor.asset_call_number_h
SELECT auditor.create_auditor ( 'asset', 'copy' );
CREATE INDEX aud_asset_cp_hist_creator_idx ON auditor.asset_copy_history ( creator );
CREATE INDEX aud_asset_cp_hist_editor_idx ON auditor.asset_copy_history ( editor );
+SELECT auditor.create_auditor ( 'serial', 'unit' );
+CREATE INDEX aud_serial_unit_hist_creator_idx ON auditor.serial_unit_history ( creator );
+CREATE INDEX aud_serial_unit_hist_editor_idx ON auditor.serial_unit_history ( editor );
SELECT auditor.create_auditor ( 'acq', 'invoice' );
diff --git a/Open-ILS/src/sql/Pg/upgrade/0540.schema.missing_serial_unit_triggers.sql b/Open-ILS/src/sql/Pg/upgrade/0540.schema.missing_serial_unit_triggers.sql
new file mode 100644
index 0000000..43d8f16
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0540.schema.missing_serial_unit_triggers.sql
@@ -0,0 +1,19 @@
+-- Evergreen DB patch 0540.schema.missing_serial_unit_triggers.sql
+--
+-- Bring serial.unit into line with asset.copy
+--
+BEGIN;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0540', :eg_version);
+
+CREATE TRIGGER sunit_status_changed_trig
+ BEFORE UPDATE ON serial.unit
+ FOR EACH ROW EXECUTE PROCEDURE asset.acp_status_changed();
+
+SELECT auditor.create_auditor ( 'serial', 'unit' );
+CREATE INDEX aud_serial_unit_hist_creator_idx ON auditor.serial_unit_history ( creator );
+CREATE INDEX aud_serial_unit_hist_editor_idx ON auditor.serial_unit_history ( editor );
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/210.schema.serials.sql | 5 +++++
Open-ILS/src/sql/Pg/901.audit-tables.sql | 3 +++
.../0540.schema.missing_serial_unit_triggers.sql | 19 +++++++++++++++++++
4 files changed, 28 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0540.schema.missing_serial_unit_triggers.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list