database/model/tables/M_INVENTORYLINE.xml
author Gorka Ion Damián <gorkaion.damian@openbravo.com>
Fri, 14 Dec 2007 16:05:32 +0000
changeset 238 006d2d0fdea6
parent 170 4b5493776a7f
child 258 a4855f55d8a1
permissions -rw-r--r--
Changed constraint conditions with postgres formatting, changed the order of foreign keys using NLS_LANGUAGE ENGLISH
carlos@0
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="TABLE M_INVENTORYLINE">
carlos@0
     3
    <table name="M_INVENTORYLINE" primaryKey="M_INVENTORYLINE_KEY">
carlos@0
     4
      <column name="M_INVENTORYLINE_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
     5
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
     6
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
     7
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
carlos@0
     8
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="SYSDATE" autoIncrement="false"/>
carlos@0
     9
      <column name="CREATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    10
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="SYSDATE" autoIncrement="false"/>
carlos@0
    11
      <column name="UPDATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    12
      <column name="M_INVENTORY_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    13
      <column name="M_LOCATOR_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    14
      <column name="M_PRODUCT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    15
      <column name="LINE" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    16
      <column name="QTYBOOK" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    17
      <column name="QTYCOUNT" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    18
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
carlos@0
    19
      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    20
      <column name="M_PRODUCT_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    21
      <column name="QUANTITYORDER" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
carlos@0
    22
      <column name="C_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    23
      <column name="QUANTITYORDERBOOK" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    24
      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_MINVENTORYLINE">
carlos@0
    25
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
    26
      </foreign-key>
carlos@0
    27
      <foreign-key foreignTable="AD_ORG" name="ADORG_MINVENTORYLINE">
carlos@0
    28
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
carlos@0
    29
      </foreign-key>
carlos@0
    30
      <foreign-key foreignTable="C_UOM" name="COUMID_MINVENTORYLINE">
carlos@0
    31
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
carlos@0
    32
      </foreign-key>
carlos@0
    33
      <foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="MATTRSETINST_MINVENTORYLINE">
carlos@0
    34
        <reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
carlos@0
    35
      </foreign-key>
adrian@94
    36
      <foreign-key foreignTable="M_INVENTORY" name="MINVENTORY_MINVENTORYLINE" onDelete="cascade">
carlos@0
    37
        <reference local="M_INVENTORY_ID" foreign="M_INVENTORY_ID"/>
carlos@0
    38
      </foreign-key>
carlos@0
    39
      <foreign-key foreignTable="M_LOCATOR" name="MLOCATOR_MINVENTORYLINE">
carlos@0
    40
        <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
carlos@0
    41
      </foreign-key>
gorkaion@238
    42
      <foreign-key foreignTable="M_PRODUCT_UOM" name="MPRODUCTUOMID_MINVENTORYLINE">
gorkaion@238
    43
        <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
gorkaion@238
    44
      </foreign-key>
carlos@0
    45
      <foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_MINVENTORYLINE">
carlos@0
    46
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
carlos@0
    47
      </foreign-key>
adrian@170
    48
      <index name="M_INVENTORYLINE_INVENTORY" unique="false">
adrian@170
    49
        <index-column name="M_INVENTORY_ID"/>
adrian@170
    50
      </index>
adrian@94
    51
      <index name="M_INVENTORYLINE_PRODUCT" unique="false">
carlos@0
    52
        <index-column name="M_PRODUCT_ID"/>
carlos@0
    53
      </index>
gorkaion@238
    54
      <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))"/>
gorkaion@238
    55
      <check name="M_INVENTORYLINE_ISACTIVE_CHECK" condition="ISACTIVE IN (&apos;Y&apos;, &apos;N&apos;)"/>
carlos@0
    56
    </table>
adrian@94
    57
  </database>