Add a deadline_date column to acq.funding_source_credit
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 16 Dec 2009 21:50:17 +0000 (21:50 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 16 Dec 2009 21:50:17 +0000 (21:50 +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/0116.schema.fund_src_cred_deadline_date.sql
M    Open-ILS/examples/fm_IDL.xml

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15175 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/0116.schema.fund_src_cred_deadline_date.sql [new file with mode: 0644]

index cc5ca61..86575cb 100644 (file)
@@ -1562,7 +1562,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
         </permacrud>
        </class>
        <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
-               <fields oils_persist:primary="id" oils_persist:sequence="">
+               <fields oils_persist:primary="id">
                        <field name="dow_0_close" />
                        <field name="dow_0_open" />
                        <field name="dow_1_close" />
@@ -3076,6 +3076,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
                        <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
                        <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
+                       <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
                        <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
@@ -3101,6 +3102,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
                        <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
                        <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
+                       <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
                        <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
                        <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
                        <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
@@ -3442,7 +3444,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
                </links>
        </class>
-       <class id="mus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
+       <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
                <fields oils_persist:primary="usr" oils_persist:sequence="">
                        <field name="balance_owed" reporter:datatype="money" />
                        <field name="total_owed" reporter:datatype="money" />
@@ -3452,13 +3454,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                <links>
                        <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                </links>
-        <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
-            <actions>
-                <retrieve permission="VIEW_USER">
-                    <context link="usr" field="home_ou"/>
-                </retrieve>
-            </actions>
-        </permacrud>
        </class>
        <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">
                <fields oils_persist:primary="code" oils_persist:sequence="">
@@ -4447,6 +4442,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
                        <field reporter:label="Amount" name="amount" reporter:datatype="money" />
                        <field reporter:label="Note" name="note" reporter:datatype="text" />
+                       <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
                </fields>
                <links>
                        <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
index 9e3a9ac..4d8d346 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 ('0115'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0116'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 9d44465..c990059 100644 (file)
@@ -97,10 +97,11 @@ CREATE TABLE acq.funding_source (
 );
 
 CREATE TABLE acq.funding_source_credit (
-       id      SERIAL  PRIMARY KEY,
-       funding_source    INT     NOT NULL REFERENCES acq.funding_source (id) DEFERRABLE INITIALLY DEFERRED,
-       amount  NUMERIC NOT NULL,
-       note    TEXT
+       id      SERIAL     PRIMARY KEY,
+       funding_source INT      NOT NULL REFERENCES acq.funding_source (id) DEFERRABLE INITIALLY DEFERRED,
+       amount         NUMERIC  NOT NULL,
+       note           TEXT,
+       deadline_date  TIMESTAMPTZ
 );
 
 CREATE TABLE acq.fund (
diff --git a/Open-ILS/src/sql/Pg/upgrade/0116.schema.fund_src_cred_deadline_date.sql b/Open-ILS/src/sql/Pg/upgrade/0116.schema.fund_src_cred_deadline_date.sql
new file mode 100644 (file)
index 0000000..0bda755
--- /dev/null
@@ -0,0 +1,8 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0116'); -- Scott McKellar
+
+ALTER TABLE acq.funding_source_credit
+ADD COLUMN deadline_date TIMESTAMPTZ;
+
+COMMIT;