database/model/tables/M_INVENTORYLINE.xml
author Adrián Romero <adrian.romero@openbravo.com>
Wed, 05 Dec 2007 20:43:45 +0000
changeset 170 4b5493776a7f
parent 94 4e7ba7b8a4ad
child 238 006d2d0fdea6
permissions -rw-r--r--
Bug fixed: [ 1845110 ] Database model not in sync with database created
<?xml version="1.0"?>
  <database name="TABLE M_INVENTORYLINE">
    <table name="M_INVENTORYLINE" primaryKey="M_INVENTORYLINE_KEY">
      <column name="M_INVENTORYLINE_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="SYSDATE" autoIncrement="false"/>
      <column name="CREATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="SYSDATE" autoIncrement="false"/>
      <column name="UPDATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="M_INVENTORY_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="M_LOCATOR_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="M_PRODUCT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="LINE" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="QTYBOOK" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="QTYCOUNT" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="M_PRODUCT_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="QUANTITYORDER" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
      <column name="C_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="QUANTITYORDERBOOK" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_MINVENTORYLINE">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="ADORG_MINVENTORYLINE">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_UOM" name="COUMID_MINVENTORYLINE">
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="MATTRSETINST_MINVENTORYLINE">
        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_INVENTORY" name="MINVENTORY_MINVENTORYLINE" onDelete="cascade">
        <reference local="M_INVENTORY_ID" foreign="M_INVENTORY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_LOCATOR" name="MLOCATOR_MINVENTORYLINE">
        <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_MINVENTORYLINE">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT_UOM" name="MPRODUCTUOMID_MINVENTORYLINE">
        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
      </foreign-key>
      <index name="M_INVENTORYLINE_INVENTORY" unique="false">
        <index-column name="M_INVENTORY_ID"/>
      </index>
      <index name="M_INVENTORYLINE_PRODUCT" unique="false">
        <index-column name="M_PRODUCT_ID"/>
      </index>
      <check name="M_INVENTORYLINE" condition="((QUANTITYORDER IS NULL AND M_PRODUCT_UOM_ID IS NULL) OR (QUANTITYORDER IS NOT NULL AND M_PRODUCT_UOM_ID IS NOT NULL))"/>
      <check name="M_INVENTORYLINE_ISACTIVE_CHECK" condition="IsActive in (&apos;Y&apos;,&apos;N&apos;)"/>
    </table>
  </database>