Add keep_debits column to acq.cancel_reason.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 28 Apr 2010 14:41:03 +0000 (14:41 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 28 Apr 2010 14:41:03 +0000 (14:41 +0000)
Add a row for delivered_but_lost, with keep_debits = TRUE.

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/0242.schema.acq-cancel-reason-keep-debits.sql
M    Open-ILS/src/sql/Pg/950.data.seed-values.sql
M    Open-ILS/examples/fm_IDL.xml

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16330 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/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/0242.schema.acq-cancel-reason-keep-debits.sql [new file with mode: 0644]

index d8e1c23..e909f1b 100644 (file)
@@ -5303,6 +5303,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
                        <field reporter:label="Label" name="label" reporter:datatype="text"/>
                        <field reporter:label="Description" name="description" reporter:datatype="text"/>
+                       <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
                </fields>
                <links>
                        <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
index 6e448d8..790c445 100644 (file)
@@ -60,7 +60,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0241'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0242'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index fe1f651..bf678e7 100644 (file)
@@ -359,6 +359,7 @@ CREATE TABLE acq.cancel_reason (
                                         DEFERRABLE INITIALLY DEFERRED,
         label         TEXT              NOT NULL,
         description   TEXT              NOT NULL,
+               keep_debits   BOOL              NOT NULL DEFAULT FALSE,
         CONSTRAINT acq_cancel_reason_one_per_org_unit UNIQUE( org_unit, label )
 );
 
index 533fa85..61f2025 100644 (file)
@@ -4683,7 +4683,9 @@ INSERT INTO acq.cancel_reason ( id, org_unit, label, description ) VALUES (
     1, 1, 'invalid_isbn', oils_i18n_gettext( 1, 'ISBN is unrecognizable', 'acqcr', 'label' ));
 INSERT INTO acq.cancel_reason ( id, org_unit, label, description ) VALUES (
     2, 1, 'postpone', oils_i18n_gettext( 2, 'Title has been postponed', 'acqcr', 'label' ));
-
+INSERT INTO acq.cancel_reason ( id, org_unit, label, description, keep_debits ) VALUES (
+    3, 1, 'delivered_but_lost',
+       oils_i18n_gettext( 2, 'Delivered but not received; presumed lost', 'acqcr', 'label' ), TRUE );
 
 INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
     VALUES (
diff --git a/Open-ILS/src/sql/Pg/upgrade/0242.schema.acq-cancel-reason-keep-debits.sql b/Open-ILS/src/sql/Pg/upgrade/0242.schema.acq-cancel-reason-keep-debits.sql
new file mode 100644 (file)
index 0000000..fe88db1
--- /dev/null
@@ -0,0 +1,12 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0242'); -- Scott McKellar
+
+ALTER TABLE acq.cancel_reason
+       ADD COLUMN keep_debits BOOL NOT NULL DEFAULT FALSE;
+
+INSERT INTO acq.cancel_reason ( id, org_unit, label, description, keep_debits ) VALUES (
+    3, 1, 'delivered_but_lost',
+    oils_i18n_gettext( 2, 'Delivered but not received; presumed lost', 'acqcr', 'label' ), TRUE );
+
+COMMIT;