[open-ils-commits] r14699 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 30 09:24:20 EDT 2009
Author: erickson
Date: 2009-10-30 09:24:18 -0400 (Fri, 30 Oct 2009)
New Revision: 14699
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0062.schema.provider_SAN_as_text.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql
Log:
Patch from J. Atzberger to change SAN datatype to TEXT
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2009-10-30 13:19:03 UTC (rev 14698)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2009-10-30 13:24:18 UTC (rev 14699)
@@ -3941,7 +3941,7 @@
<field reporter:label="Code" name="code" reporter:datatype="text" />
<field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
<field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
- <field reporter:label="SAN" name="san" reporter:datatype="int" />
+ <field reporter:label="SAN" name="san" reporter:datatype="text" />
</fields>
<links>
<link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
Modified: trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql 2009-10-30 13:19:03 UTC (rev 14698)
+++ trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql 2009-10-30 13:24:18 UTC (rev 14699)
@@ -36,7 +36,7 @@
currency_type TEXT NOT NULL REFERENCES acq.currency_type (code) DEFERRABLE INITIALLY DEFERRED,
code TEXT NOT NULL,
holding_tag TEXT,
- san INT,
+ san TEXT,
CONSTRAINT provider_name_once_per_owner UNIQUE (name,owner),
CONSTRAINT code_once_per_owner UNIQUE (code, owner)
);
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0062.schema.provider_SAN_as_text.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0062.schema.provider_SAN_as_text.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0062.schema.provider_SAN_as_text.sql 2009-10-30 13:24:18 UTC (rev 14699)
@@ -0,0 +1,8 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0062');
+
+ALTER TABLE acq.provider ALTER COLUMN san TYPE TEXT USING lpad(text(san), 7, '0');
+
+COMMIT;
+
More information about the open-ils-commits
mailing list