Added create_time columns to acq.fund_debit and acq.fund_allocation.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Apr 2009 19:29:55 +0000 (19:29 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Apr 2009 19:29:55 +0000 (19:29 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12948 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 8598122..0d0c28f 100644 (file)
@@ -119,7 +119,8 @@ CREATE TABLE acq.fund_debit (
        amount                  NUMERIC NOT NULL,
        encumbrance             BOOL    NOT NULL DEFAULT TRUE,
        debit_type              TEXT    NOT NULL,
-       xfer_destination        INT     REFERENCES acq.fund (id) DEFERRABLE INITIALLY DEFERRED
+       xfer_destination        INT     REFERENCES acq.fund (id) DEFERRABLE INITIALLY DEFERRED,
+       create_time     TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
 CREATE TABLE acq.fund_allocation (
@@ -130,6 +131,7 @@ CREATE TABLE acq.fund_allocation (
     percent     NUMERIC CHECK (percent IS NULL OR percent BETWEEN 0.0 AND 100.0),
     allocator   INT NOT NULL REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED,
     note        TEXT,
+       create_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
     CONSTRAINT allocation_amount_or_percent CHECK ((percent IS NULL AND amount IS NOT NULL) OR (percent IS NOT NULL AND amount IS NULL))
 );