src-db/database/model/tables/M_TRANSACTION.xml
author Stefan Hühner <stefan.huehner@openbravo.com>
Thu, 07 Oct 2010 16:53:30 +0200
changeset 8505 a2bb7e6fb443
parent 8504 802eae4a434d
child 16960 ea1924b18268
permissions -rw-r--r--
Issue 14514: fix wrong changeset 802eae4a434d
- That changeset by accident removed all existing check constraint
in addition to the wanted removal of a few lines in sourcedata of
AD_TEXTINTERFACES.
- This commit reverts the unwatend parts, readding all the missing
constrainst and only keep the removal in sourcedata/AD_TEXTINTERFACES.xml
<?xml version="1.0"?>
  <database name="TABLE M_TRANSACTION">
    <table name="M_TRANSACTION" primaryKey="M_TRANSACTION_KEY">
      <column name="M_TRANSACTION_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[Y]]></default>
        <onCreateDefault/>
      </column>
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default><![CDATA[SYSDATE]]></default>
        <onCreateDefault/>
      </column>
      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default><![CDATA[SYSDATE]]></default>
        <onCreateDefault/>
      </column>
      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="MOVEMENTTYPE" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_LOCATOR_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_PRODUCT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="MOVEMENTDATE" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="MOVEMENTQTY" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="M_INVENTORYLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_MOVEMENTLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_INOUTLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_PRODUCTIONLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_PROJECTISSUE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="M_PRODUCT_UOM_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="QUANTITYORDER" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_UOM_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="M_INTERNAL_CONSUMPTIONLINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="M_INTERNAL_CONSUMPTIONLINE" name="M_INTL_CONSUMP_MTRANSACTION">
        <reference local="M_INTERNAL_CONSUMPTIONLINE_ID" foreign="M_INTERNAL_CONSUMPTIONLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_CLIENT" name="M_TRANSACTION_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="M_TRANSACTION_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECTISSUE" name="M_TRANSACTION_C_PROJECTISSUE">
        <reference local="C_PROJECTISSUE_ID" foreign="C_PROJECTISSUE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_UOM" name="M_TRANSACTION_C_UOM">
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="M_TRANSACTION_M_ATTRIBUTESETIN">
        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_INOUTLINE" name="M_TRANSACTION_M_INOUTLINE">
        <reference local="M_INOUTLINE_ID" foreign="M_INOUTLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_INVENTORYLINE" name="M_TRANSACTION_M_INVENTORYLINE">
        <reference local="M_INVENTORYLINE_ID" foreign="M_INVENTORYLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_LOCATOR" name="M_TRANSACTION_M_LOCATOR">
        <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_MOVEMENTLINE" name="M_TRANSACTION_M_MOVEMENTLINE">
        <reference local="M_MOVEMENTLINE_ID" foreign="M_MOVEMENTLINE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="M_TRANSACTION_M_PRODUCT">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT_UOM" name="M_TRANSACTION_M_PRODUCT_UOM">
        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCTIONLINE" name="M_TRANSACTION_M_PRODUCTIONLINE">
        <reference local="M_PRODUCTIONLINE_ID" foreign="M_PRODUCTIONLINE_ID"/>
      </foreign-key>
      <index name="M_TRANSSACTION_PRODUCT" unique="false">
        <index-column name="M_PRODUCT_ID"/>
      </index>
      <check name="M_TRANSACTION_CHECK1"><![CDATA[((QUANTITYORDER IS NULL) AND (M_PRODUCT_UOM_ID IS NULL)) OR ((QUANTITYORDER IS NOT NULL) AND (M_PRODUCT_UOM_ID IS NOT NULL))]]></check>
      <check name="M_TRANSACTION_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>