database/model/tables/FACT_ACCT.xml
author Carlos Romero <carlos.romero@openbravo.com>
Tue, 06 Nov 2007 08:33:31 +0000
changeset 0 0247c26f10c6
child 94 4e7ba7b8a4ad
permissions -rw-r--r--
Modified PostgreSQL post script in order to include C_DEBT_PAYMENT_GENERATE modification tules
carlos@0
     1
<?xml version="1.0"?>
carlos@0
     2
<database name="TABLE FACT_ACCT">
carlos@0
     3
    <table name="FACT_ACCT" primaryKey="FACT_ACCT_KEY">
carlos@0
     4
      <column name="FACT_ACCT_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="C_ACCTSCHEMA_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    13
      <column name="ACCOUNT_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    14
      <column name="DATETRX" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"/>
carlos@0
    15
      <column name="DATEACCT" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"/>
carlos@0
    16
      <column name="C_PERIOD_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    17
      <column name="AD_TABLE_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    18
      <column name="RECORD_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    19
      <column name="LINE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    20
      <column name="GL_CATEGORY_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    21
      <column name="GL_BUDGET_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    22
      <column name="C_TAX_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    23
      <column name="M_LOCATOR_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    24
      <column name="POSTINGTYPE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false"/>
carlos@0
    25
      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    26
      <column name="AMTSOURCEDR" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    27
      <column name="AMTSOURCECR" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    28
      <column name="AMTACCTDR" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    29
      <column name="AMTACCTCR" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    30
      <column name="C_UOM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    31
      <column name="QTY" primaryKey="false" required="false" type="DECIMAL" default="0" autoIncrement="false"/>
carlos@0
    32
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    33
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    34
      <column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    35
      <column name="C_LOCFROM_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    36
      <column name="C_LOCTO_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    37
      <column name="C_SALESREGION_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    38
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    39
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    40
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    41
      <column name="USER1_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    42
      <column name="USER2_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    43
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
carlos@0
    44
      <column name="A_ASSET_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    45
      <column name="FACT_ACCT_GROUP_ID" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    46
      <column name="SEQNO" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    47
      <column name="FACTACCTTYPE" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
carlos@0
    48
      <column name="DOCBASETYPE" primaryKey="false" required="false" type="CHAR" size="3" autoIncrement="false"/>
carlos@0
    49
      <column name="ACCTVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false"/>
carlos@0
    50
      <column name="ACCTDESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
carlos@0
    51
      <column name="RECORD_ID2" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    52
      <check name="FACT_ACCT_ISACTIVE_CHECK" condition="IsActive in ('Y','N')"/> 
carlos@0
    53
      <foreign-key foreignTable="A_ASSET" name="AASSET_FACTACCT">
carlos@0
    54
        <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
carlos@0
    55
      </foreign-key>
carlos@0
    56
      <foreign-key foreignTable="AD_CLIENT" name="AC_CLIENT_FACT_ACCT">
carlos@0
    57
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
    58
      </foreign-key>
carlos@0
    59
      <foreign-key foreignTable="AD_ORG" name="AD_ORG_FACT_ACCT">
carlos@0
    60
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
carlos@0
    61
      </foreign-key>
carlos@0
    62
      <foreign-key foreignTable="AD_ORG" name="AD_ORGTRX_FACT_ACCT">
carlos@0
    63
        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
carlos@0
    64
      </foreign-key>
carlos@0
    65
      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_FACTACCT">
carlos@0
    66
        <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
carlos@0
    67
      </foreign-key>
carlos@0
    68
      <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_FACTACCT"   onDelete="cascade">
carlos@0
    69
        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
carlos@0
    70
      </foreign-key>
carlos@0
    71
      <foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_FACTACCT">
carlos@0
    72
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
carlos@0
    73
      </foreign-key>
carlos@0
    74
      <foreign-key foreignTable="C_BPARTNER" name="C_BUSPARTNER_FACT_ACCT">
carlos@0
    75
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
carlos@0
    76
      </foreign-key>
carlos@0
    77
      <foreign-key foreignTable="C_CAMPAIGN" name="SO_CAMPAIGN_FACT_ACCT">
carlos@0
    78
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
carlos@0
    79
      </foreign-key>
carlos@0
    80
      <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCY_FACT_ACCT">
carlos@0
    81
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
carlos@0
    82
      </foreign-key>
carlos@0
    83
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUE_FACTACCT">
carlos@0
    84
        <reference local="ACCOUNT_ID" foreign="C_ELEMENTVALUE_ID"/>
carlos@0
    85
      </foreign-key>
carlos@0
    86
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER2_FACTACCT">
carlos@0
    87
        <reference local="USER2_ID" foreign="C_ELEMENTVALUE_ID"/>
carlos@0
    88
      </foreign-key>
carlos@0
    89
      <foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENTVALUEUSER1_FACTACCT">
carlos@0
    90
        <reference local="USER1_ID" foreign="C_ELEMENTVALUE_ID"/>
carlos@0
    91
      </foreign-key>
carlos@0
    92
      <foreign-key foreignTable="C_LOCATION" name="C_LOCATIONTO_FACT_ACCT">
carlos@0
    93
        <reference local="C_LOCTO_ID" foreign="C_LOCATION_ID"/>
carlos@0
    94
      </foreign-key>
carlos@0
    95
      <foreign-key foreignTable="C_LOCATION" name="C_LOCATIONFROM_FACT_ACCT">
carlos@0
    96
        <reference local="C_LOCFROM_ID" foreign="C_LOCATION_ID"/>
carlos@0
    97
      </foreign-key>
carlos@0
    98
      <foreign-key foreignTable="C_PERIOD" name="CPERIOD_FACTACCT">
carlos@0
    99
        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
carlos@0
   100
      </foreign-key>
carlos@0
   101
      <foreign-key foreignTable="C_PROJECT" name="C_PROJECT_FACT_ACCT">
carlos@0
   102
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
carlos@0
   103
      </foreign-key>
carlos@0
   104
      <foreign-key foreignTable="C_SALESREGION" name="C_SALESREGION_FACTACCT">
carlos@0
   105
        <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
carlos@0
   106
      </foreign-key>
carlos@0
   107
      <foreign-key foreignTable="C_TAX" name="CTAX_FACTACCT">
carlos@0
   108
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
carlos@0
   109
      </foreign-key>
carlos@0
   110
      <foreign-key foreignTable="C_UOM" name="C_UOM_FACT_ACCT">
carlos@0
   111
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
carlos@0
   112
      </foreign-key>
carlos@0
   113
      <foreign-key foreignTable="GL_BUDGET" name="GLBUDGET_FACTACCT">
carlos@0
   114
        <reference local="GL_BUDGET_ID" foreign="GL_BUDGET_ID"/>
carlos@0
   115
      </foreign-key>
carlos@0
   116
      <foreign-key foreignTable="GL_CATEGORY" name="GLCATEGORY_FACTACCT">
carlos@0
   117
        <reference local="GL_CATEGORY_ID" foreign="GL_CATEGORY_ID"/>
carlos@0
   118
      </foreign-key>
carlos@0
   119
      <foreign-key foreignTable="M_LOCATOR" name="MLOCATOR_FACTACCT">
carlos@0
   120
        <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
carlos@0
   121
      </foreign-key>
carlos@0
   122
      <foreign-key foreignTable="M_PRODUCT" name="M_PRODUCT_FACT_ACCT">
carlos@0
   123
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
carlos@0
   124
      </foreign-key>
carlos@0
   125
      <index name="FACT_ACCT_ACCOUNT">
carlos@0
   126
        <index-column name="AD_CLIENT_ID"/>
carlos@0
   127
        <index-column name="AD_ORG_ID"/>
carlos@0
   128
        <index-column name="C_ACCTSCHEMA_ID"/>
carlos@0
   129
        <index-column name="ACCOUNT_ID"/>
carlos@0
   130
      </index>
carlos@0
   131
      <index name="FACT_ACCT_DATEACCT">
carlos@0
   132
        <index-column name="DATEACCT"/>
carlos@0
   133
      </index>
carlos@0
   134
      <index name="FACT_ACCT_GROUP">
carlos@0
   135
        <index-column name="FACT_ACCT_GROUP_ID"/>
carlos@0
   136
      </index>
carlos@0
   137
      <index name="FACT_ACCT_TABLE_RECORD_ID">
carlos@0
   138
        <index-column name="AD_TABLE_ID"/>
carlos@0
   139
        <index-column name="RECORD_ID"/>
carlos@0
   140
      </index>
carlos@0
   141
    </table>
carlos@0
   142
</database>