[open-ils-commits] r15323 - trunk/Open-ILS/src/sql/Pg/upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 15 11:10:51 EST 2010
Author: scottmk
Date: 2010-01-15 11:10:49 -0500 (Fri, 15 Jan 2010)
New Revision: 15323
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0135.schema.acq.fund_transfer_nulls.sql
Log:
In acq.fund_transfer: make the dest_fund and dest_amount columns nullable.
That way they can accommodate deallocations, where we move money out of a
fund without moving it into another fund.
A upgrade/0135.schema.acq.fund_transfer_nulls.sql
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0135.schema.acq.fund_transfer_nulls.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0135.schema.acq.fund_transfer_nulls.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0135.schema.acq.fund_transfer_nulls.sql 2010-01-15 16:10:49 UTC (rev 15323)
@@ -0,0 +1,15 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0135'); -- Scott McKellar
+
+-- Make dest_fund and dest_amount nullable in order to accommodate
+-- deallocations; i.e. when we move money out of a fund without
+-- putting it into some other fund.
+
+ALTER TABLE acq.fund_transfer
+ ALTER COLUMN dest_fund DROP NOT NULL;
+
+ALTER TABLE acq.fund_transfer
+ ALTER COLUMN dest_amount DROP NOT NULL;
+
+COMMIT;
More information about the open-ils-commits
mailing list