Fixes Issue 40130:Set two new columns in C_Invoice as nullable and do not
authorAtul Gaware <atul.gaware@openbravo.com>
Wed, 13 Feb 2019 10:09:43 +0530
changeset 35324 e3d66bfad0a5
parent 35323 4ab5cd94e65e
child 35325 bf5f0343dba5
Fixes Issue 40130:Set two new columns in C_Invoice as nullable and do not
set a default value

** Remove NOT NULL constraint for columns CREATEFROMORDERS, CREATEFROMINOUTS
** Avoid setting DEFAULT value N for above columns.
** Remove check constraint either Y or N for above columns.
src-db/database/model/tables/C_INVOICE.xml
src-db/database/sourcedata/AD_COLUMN.xml
--- a/src-db/database/model/tables/C_INVOICE.xml	Thu Jan 24 11:10:47 2019 +0100
+++ b/src-db/database/model/tables/C_INVOICE.xml	Wed Feb 13 10:09:43 2019 +0530
@@ -277,12 +277,12 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault><![CDATA[0]]></onCreateDefault>
       </column>
-      <column name="CREATEFROMORDERS" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
-        <default><![CDATA[N]]></default>
+      <column name="CREATEFROMORDERS" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+        <default/>
         <onCreateDefault/>
       </column>
-      <column name="CREATEFROMINOUTS" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
-        <default><![CDATA[N]]></default>
+      <column name="CREATEFROMINOUTS" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+        <default/>
         <onCreateDefault/>
       </column>
       <foreign-key foreignTable="C_BPARTNER_LOCATION" name="C_BPLOCATION_CINVOICE">
@@ -383,8 +383,6 @@
         <index-column name="UPDATED"/>
       </index>
       <check name="C_INVOICE_CREATEFROM_CHECK"><![CDATA[CREATEFROM IN ('Y', 'N')]]></check>
-      <check name="C_INVOICE_CREATEFROMIO_CHEK"><![CDATA[CREATEFROMINOUTS IN ('Y', 'N')]]></check>
-      <check name="C_INVOICE_CREATEFROMO_CHEK"><![CDATA[CREATEFROMORDERS IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_GENERATETO_CHECK"><![CDATA[GENERATETO IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="C_INVOICE_ISCASHVAT_CH"><![CDATA[ISCASHVAT IN ('Y', 'N')]]></check>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jan 24 11:10:47 2019 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Wed Feb 13 10:09:43 2019 +0530
@@ -259902,7 +259902,7 @@
 <!--35B6CA608E4544DABC461A352856483E-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
 <!--35B6CA608E4544DABC461A352856483E-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--35B6CA608E4544DABC461A352856483E-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--35B6CA608E4544DABC461A352856483E-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--35B6CA608E4544DABC461A352856483E-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--35B6CA608E4544DABC461A352856483E-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--35B6CA608E4544DABC461A352856483E-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--35B6CA608E4544DABC461A352856483E-->  <SEQNO><![CDATA[880]]></SEQNO>
@@ -378091,7 +378091,7 @@
 <!--E4657BAF62244FA786B4E5BD7C98E52B-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
 <!--E4657BAF62244FA786B4E5BD7C98E52B-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--E4657BAF62244FA786B4E5BD7C98E52B-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--E4657BAF62244FA786B4E5BD7C98E52B-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--E4657BAF62244FA786B4E5BD7C98E52B-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--E4657BAF62244FA786B4E5BD7C98E52B-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--E4657BAF62244FA786B4E5BD7C98E52B-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--E4657BAF62244FA786B4E5BD7C98E52B-->  <SEQNO><![CDATA[870]]></SEQNO>