Add boolean column prepayment_required to acq.purchase_order and
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 11 Mar 2010 15:54:03 +0000 (15:54 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 11 Mar 2010 15:54:03 +0000 (15:54 +0000)
acq.acq_purchase_order_history.

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/0190.schema.acq.po-prepayment-required.sql
M    Open-ILS/examples/fm_IDL.xml

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15794 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/0190.schema.acq.po-prepayment-required.sql [new file with mode: 0644]

index 39b2110..a903687 100644 (file)
@@ -5145,6 +5145,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
                        <field reporter:label="Name" name="name" reporter:datatype="text" />
                        <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
+                       <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
                        <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
                        <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
                        <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
@@ -5189,6 +5190,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
                        <field reporter:label="Name" name="name" reporter:datatype="text"/>
                        <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
+                       <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
                </fields>
                <links>
                        <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
@@ -6363,9 +6365,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
                </fields>
                <links>
-                       <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
-                       <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
+                       <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                </permacrud>
@@ -6381,7 +6383,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
                </fields>
                <links>
-                       <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                </permacrud>
@@ -6397,7 +6399,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                </fields>
                <links>
                        <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
-                       <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
+                       <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                </permacrud>
@@ -6413,8 +6415,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
                </fields>
                <links>
-                       <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
-                       <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
+                       <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
+                       <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                </permacrud>
index 9a72989..eceeffb 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 ('0189'); -- berick
+INSERT INTO config.upgrade_log (version) VALUES ('0190'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 6033197..e250f79 100644 (file)
@@ -350,7 +350,8 @@ CREATE TABLE acq.purchase_order (
        order_date              TIMESTAMP WITH TIME ZONE,
        name                    TEXT                                    NOT NULL,
        cancel_reason   INT                     REFERENCES acq.cancel_reason( id )
-                                            DEFERRABLE INITIALLY DEFERRED
+                                            DEFERRABLE INITIALLY DEFERRED,
+       prepayment_required BOOLEAN NOT NULL DEFAULT FALSE
 );
 CREATE INDEX po_owner_idx ON acq.purchase_order (owner);
 CREATE INDEX po_provider_idx ON acq.purchase_order (provider);
diff --git a/Open-ILS/src/sql/Pg/upgrade/0190.schema.acq.po-prepayment-required.sql b/Open-ILS/src/sql/Pg/upgrade/0190.schema.acq.po-prepayment-required.sql
new file mode 100644 (file)
index 0000000..dacf261
--- /dev/null
@@ -0,0 +1,11 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0190'); -- Scott McKellar
+
+ALTER TABLE acq.purchase_order
+       ADD COLUMN prepayment_required BOOLEAN NOT NULL DEFAULT FALSE;
+
+ALTER TABLE acq.acq_purchase_order_history
+       ADD COLUMN prepayment_required BOOLEAN NOT NULL DEFAULT FALSE;
+
+COMMIT;