From 7ae9fa56ef5f4f8a299fc718559dfe4a47fbd50f Mon Sep 17 00:00:00 2001
From: scottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Wed, 22 Sep 2010 12:55:28 +0000
Subject: [PATCH] In acq.fund_transfer: drop the NOT NULL constraint from
 dest_fund and dest_amount, in order to accommodate deallocations -- where we
 move money out of a fund without moving it into another fund.

This change was applied via upgrade script # 0135, but apparently was
never applied to the base installation script.

M    Open-ILS/src/sql/Pg/200.schema.acq.sql


git-svn-id: svn://svn.open-ils.org/ILS/trunk@17886 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/src/sql/Pg/200.schema.acq.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql
index db632d2842..13db4da102 100644
--- a/Open-ILS/src/sql/Pg/200.schema.acq.sql
+++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql
@@ -673,9 +673,9 @@ CREATE TABLE acq.fund_transfer (
     src_fund         INT            NOT NULL REFERENCES acq.fund( id )
                                     DEFERRABLE INITIALLY DEFERRED,
     src_amount       NUMERIC        NOT NULL,
-    dest_fund        INT            NOT NULL REFERENCES acq.fund( id )
+    dest_fund        INT            REFERENCES acq.fund( id )
                                     DEFERRABLE INITIALLY DEFERRED,
-    dest_amount      NUMERIC        NOT NULL,
+    dest_amount      NUMERIC,
     transfer_time    TIMESTAMPTZ    NOT NULL DEFAULT now(),
     transfer_user    INT            NOT NULL REFERENCES actor.usr( id )
                                     DEFERRABLE INITIALLY DEFERRED,
-- 
2.11.0