Add two columns, both intervals, both nullable:
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 4 Mar 2010 17:42:02 +0000 (17:42 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 4 Mar 2010 17:42:02 +0000 (17:42 +0000)
 acq.provider.default_claim_interval
 acq.lineitem.claim_interval

See KCLS ticket #3012.

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/0176.schema.acq.claim_interval.sql
M    Open-ILS/examples/fm_IDL.xml

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

index 76b9e4e..2dcc6ef 100644 (file)
@@ -4466,6 +4466,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Email" name="email" reporter:datatype="text" />
                        <field reporter:label="Phone" name="phone" reporter:datatype="text" />
                        <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
+                       <field reporter:label="Default Claim Interval" name="default_claim_interval" reporter:datatype="interval" />
                </fields>
                <links>
                        <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
@@ -5188,6 +5189,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="State" name="state" reporter:datatype="text" />
                        <field reporter:label="Creator" name="creator" reporter:datatype="link" />
                        <field reporter:label="Editor" name="editor" reporter:datatype="link" />
+                       <field reporter:label="Claim Interval" name="claim_interval" reporter:datatype="interval" />
                        <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
                        <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
                        <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
index 8a85533..c42e644 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 ('0175'); -- miker
+INSERT INTO config.upgrade_log (version) VALUES ('0176'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 630d128..6fbcf59 100644 (file)
@@ -44,6 +44,7 @@ CREATE TABLE acq.provider (
     email               TEXT,
     phone               TEXT,
     fax_phone           TEXT,
+       default_claim_interval INTERVAL,
     CONSTRAINT provider_name_once_per_owner UNIQUE (name,owner),
        CONSTRAINT code_once_per_owner UNIQUE (code, owner)
 );
@@ -433,6 +434,7 @@ CREATE TABLE acq.lineitem (
        eg_bib_id           INT                         REFERENCES biblio.record_entry (id) DEFERRABLE INITIALLY DEFERRED,
        source_label        TEXT,
        state               TEXT                        NOT NULL DEFAULT 'new',
+       claim_interval      INTERVAL,
     CONSTRAINT picklist_or_po CHECK (picklist IS NOT NULL OR purchase_order IS NOT NULL)
 );
 CREATE INDEX li_po_idx ON acq.lineitem (purchase_order);
diff --git a/Open-ILS/src/sql/Pg/upgrade/0176.schema.acq.claim_interval.sql b/Open-ILS/src/sql/Pg/upgrade/0176.schema.acq.claim_interval.sql
new file mode 100644 (file)
index 0000000..9e373da
--- /dev/null
@@ -0,0 +1,11 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0176'); -- Scott McKellar
+
+ALTER TABLE acq.provider
+       ADD COLUMN default_claim_interval INTERVAL;
+
+ALTER TABLE acq.lineitem
+       ADD COLUMN claim_interval INTERVAL;
+
+COMMIT;