database/model/tables/FACT_ACCT.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 FACT_ACCT">
    <table name="FACT_ACCT" primaryKey="FACT_ACCT_KEY">
      <column name="FACT_ACCT_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="C_ACCTSCHEMA_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="ACCOUNT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="DATETRX" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="DATEACCT" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"/>
      <column name="C_PERIOD_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="AD_TABLE_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="RECORD_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="LINE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="GL_CATEGORY_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="GL_BUDGET_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="C_TAX_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="M_LOCATOR_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="POSTINGTYPE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false"/>
      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="AMTSOURCEDR" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="AMTSOURCECR" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="AMTACCTDR" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="AMTACCTCR" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="C_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="QTY" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="C_LOCFROM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="C_LOCTO_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="C_SALESREGION_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="USER1_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="USER2_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
      <column name="A_ASSET_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="FACT_ACCT_GROUP_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="SEQNO" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="FACTACCTTYPE" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
      <column name="DOCBASETYPE" primaryKey="false" required="false" type="CHAR" size="3" autoIncrement="false"/>
      <column name="ACCTVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false"/>
      <column name="ACCTDESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
      <column name="RECORD_ID2" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <foreign-key foreignTable="A_ASSET" name="AASSET_FACTACCT">
        <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_CLIENT" name="AC_CLIENT_FACT_ACCT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="AD_ORG_FACT_ACCT">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="AD_ORGTRX_FACT_ACCT">
        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_FACTACCT">
        <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_FACTACCT" onDelete="cascade">
        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_FACTACCT">
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BPARTNER" name="C_BUSPARTNER_FACT_ACCT">
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCY_FACT_ACCT">
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUE_FACTACCT">
        <reference local="ACCOUNT_ID" foreign="C_ELEMENTVALUE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER1_FACTACCT">
        <reference local="USER1_ID" foreign="C_ELEMENTVALUE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER2_FACTACCT">
        <reference local="USER2_ID" foreign="C_ELEMENTVALUE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_LOCATION" name="C_LOCATIONFROM_FACT_ACCT">
        <reference local="C_LOCFROM_ID" foreign="C_LOCATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_LOCATION" name="C_LOCATIONTO_FACT_ACCT">
        <reference local="C_LOCTO_ID" foreign="C_LOCATION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PERIOD" name="CPERIOD_FACTACCT">
        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_PROJECT" name="C_PROJECT_FACT_ACCT">
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_SALESREGION" name="C_SALESREGION_FACTACCT">
        <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_TAX" name="CTAX_FACTACCT">
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_UOM" name="C_UOM_FACT_ACCT">
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
      </foreign-key>
      <foreign-key foreignTable="GL_BUDGET" name="GLBUDGET_FACTACCT">
        <reference local="GL_BUDGET_ID" foreign="GL_BUDGET_ID"/>
      </foreign-key>
      <foreign-key foreignTable="GL_CATEGORY" name="GLCATEGORY_FACTACCT">
        <reference local="GL_CATEGORY_ID" foreign="GL_CATEGORY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_LOCATOR" name="MLOCATOR_FACTACCT">
        <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
      </foreign-key>
      <foreign-key foreignTable="M_PRODUCT" name="M_PRODUCT_FACT_ACCT">
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CAMPAIGN" name="SO_CAMPAIGN_FACT_ACCT">
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
      </foreign-key>
      <index name="FACT_ACCT_ACCOUNT" unique="false">
        <index-column name="AD_CLIENT_ID"/>
        <index-column name="AD_ORG_ID"/>
        <index-column name="C_ACCTSCHEMA_ID"/>
        <index-column name="ACCOUNT_ID"/>
      </index>
      <index name="FACT_ACCT_DATEACCT" unique="false">
        <index-column name="DATEACCT"/>
      </index>
      <index name="FACT_ACCT_GROUP" unique="false">
        <index-column name="FACT_ACCT_GROUP_ID"/>
      </index>
      <index name="FACT_ACCT_TABLE_RECORD_ID" unique="false">
        <index-column name="AD_TABLE_ID"/>
        <index-column name="RECORD_ID"/>
      </index>
      <check name="FACT_ACCT_ISACTIVE_CHECK" condition="IsActive in (&apos;Y&apos;,&apos;N&apos;)"/>
    </table>
  </database>