Add a new column funding_source_credit to the acq.fund_transfer table.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 4 Jan 2010 16:51:18 +0000 (16:51 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 4 Jan 2010 16:51:18 +0000 (16:51 +0000)
M    Open-ILS/src/sql/Pg/200.schema.acq.sql
M    Open-ILS/src/sql/Pg/002.schema.config.sql
A    Open-ILS/src/sql/Pg/upgrade/0129.schema.fund-transfer-credit.sql
M    Open-ILS/examples/fm_IDL.xml

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15259 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/200.schema.acq.sql
Open-ILS/src/sql/Pg/upgrade/0129.schema.fund-transfer-credit.sql [new file with mode: 0644]

index 876e3be..21470d6 100644 (file)
@@ -4436,11 +4436,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
                        <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
                        <field reporter:label="Note" name="note" reporter:datatype="text"/>
+                       <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
                </fields>
                <links>
                        <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
                        <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
                        <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
+                       <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                </permacrud>
@@ -6044,7 +6046,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                </permacrud>
        </class>
 
-       <class id="cmpcsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">
+       <class id="cmpcvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">
                <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
                        <field reporter:label="ID" name="id" reporter:datatype="id"/>
                        <field reporter:label="Value" name="value" reporter:datatype="text"/>
index bd85991..5d01765 100644 (file)
@@ -51,7 +51,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0128'); -- berick
+INSERT INTO config.upgrade_log (version) VALUES ('0129'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 61d8121..54faee0 100644 (file)
@@ -482,7 +482,9 @@ CREATE TABLE acq.fund_transfer (
     transfer_time    TIMESTAMPTZ    NOT NULL DEFAULT now(),
     transfer_user    INT            NOT NULL REFERENCES actor.usr( id )
                                     DEFERRABLE INITIALLY DEFERRED,
-    note             TEXT
+    note             TEXT,
+       funding_source_credit INT       NOT NULL REFERENCES acq.funding_source_credit( id )
+                                    DEFERRABLE INITIALLY DEFERRED
 );
 
 CREATE INDEX acqftr_usr_idx
diff --git a/Open-ILS/src/sql/Pg/upgrade/0129.schema.fund-transfer-credit.sql b/Open-ILS/src/sql/Pg/upgrade/0129.schema.fund-transfer-credit.sql
new file mode 100644 (file)
index 0000000..f5c766e
--- /dev/null
@@ -0,0 +1,10 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0129'); -- Scott McKellar
+
+ALTER TABLE acq.fund_transfer
+ADD COLUMN funding_source_credit INTEGER NOT NULL
+       REFERENCES acq.funding_source_credit(id)
+       DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;