[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 36a6e7a9930af4e5830b8f34d28dd75294b78da8
Evergreen Git
git at git.evergreen-ils.org
Tue May 24 17:09:20 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, rel_2_0 has been updated
via 36a6e7a9930af4e5830b8f34d28dd75294b78da8 (commit)
from 893057eb12be32bb0aa283324a3e46174cb0cc54 (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 36a6e7a9930af4e5830b8f34d28dd75294b78da8
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 e63436b..316c23d 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -57,7 +57,7 @@ CREATE TABLE config.upgrade_log (
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0538'); -- senator
+INSERT INTO config.upgrade_log (version) VALUES ('0540'); -- 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