src-db/database/model/tables/FACT_ACCT.xml
author Stefan Hühner <stefan.huehner@openbravo.com>
Thu, 07 Oct 2010 16:53:30 +0200
changeset 8505 a2bb7e6fb443
parent 8504 802eae4a434d
child 16211 c8a9f6fc04d6
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
carlos@0
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="TABLE FACT_ACCT">
carlos@0
     3
    <table name="FACT_ACCT" primaryKey="FACT_ACCT_KEY">
juanpablo@1605
     4
      <column name="FACT_ACCT_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
     5
        <default/>
antonio@735
     6
        <onCreateDefault/>
antonio@735
     7
      </column>
juanpablo@1605
     8
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
     9
        <default/>
antonio@735
    10
        <onCreateDefault/>
antonio@735
    11
      </column>
juanpablo@1605
    12
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    13
        <default/>
antonio@735
    14
        <onCreateDefault/>
antonio@735
    15
      </column>
antonio@735
    16
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
antonio@735
    17
        <default><![CDATA[Y]]></default>
antonio@735
    18
        <onCreateDefault/>
antonio@735
    19
      </column>
antonio@735
    20
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    21
        <default><![CDATA[SYSDATE]]></default>
antonio@735
    22
        <onCreateDefault/>
antonio@735
    23
      </column>
juanpablo@1605
    24
      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    25
        <default/>
antonio@735
    26
        <onCreateDefault/>
antonio@735
    27
      </column>
antonio@735
    28
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    29
        <default><![CDATA[SYSDATE]]></default>
antonio@735
    30
        <onCreateDefault/>
antonio@735
    31
      </column>
juanpablo@1605
    32
      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    33
        <default/>
antonio@735
    34
        <onCreateDefault/>
antonio@735
    35
      </column>
juanpablo@1605
    36
      <column name="C_ACCTSCHEMA_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    37
        <default/>
antonio@735
    38
        <onCreateDefault/>
antonio@735
    39
      </column>
juanpablo@1605
    40
      <column name="ACCOUNT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    41
        <default/>
antonio@735
    42
        <onCreateDefault/>
antonio@735
    43
      </column>
antonio@735
    44
      <column name="DATETRX" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    45
        <default/>
antonio@735
    46
        <onCreateDefault/>
antonio@735
    47
      </column>
antonio@735
    48
      <column name="DATEACCT" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    49
        <default/>
antonio@735
    50
        <onCreateDefault/>
antonio@735
    51
      </column>
juanpablo@1605
    52
      <column name="C_PERIOD_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    53
        <default/>
antonio@735
    54
        <onCreateDefault/>
antonio@735
    55
      </column>
juanpablo@1605
    56
      <column name="AD_TABLE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    57
        <default/>
antonio@735
    58
        <onCreateDefault/>
antonio@735
    59
      </column>
juanpablo@1605
    60
      <column name="RECORD_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    61
        <default/>
antonio@735
    62
        <onCreateDefault/>
antonio@735
    63
      </column>
juanpablo@1605
    64
      <column name="LINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    65
        <default/>
antonio@735
    66
        <onCreateDefault/>
antonio@735
    67
      </column>
juanpablo@1605
    68
      <column name="GL_CATEGORY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    69
        <default/>
antonio@735
    70
        <onCreateDefault/>
antonio@735
    71
      </column>
juanpablo@1605
    72
      <column name="C_TAX_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    73
        <default/>
antonio@735
    74
        <onCreateDefault/>
antonio@735
    75
      </column>
juanpablo@1605
    76
      <column name="M_LOCATOR_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    77
        <default/>
antonio@735
    78
        <onCreateDefault/>
antonio@735
    79
      </column>
asier@2586
    80
      <column name="POSTINGTYPE" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
antonio@735
    81
        <default/>
antonio@735
    82
        <onCreateDefault/>
antonio@735
    83
      </column>
juanpablo@1605
    84
      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    85
        <default/>
antonio@735
    86
        <onCreateDefault/>
antonio@735
    87
      </column>
antonio@735
    88
      <column name="AMTSOURCEDR" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    89
        <default><![CDATA[0]]></default>
antonio@735
    90
        <onCreateDefault/>
antonio@735
    91
      </column>
antonio@735
    92
      <column name="AMTSOURCECR" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    93
        <default><![CDATA[0]]></default>
antonio@735
    94
        <onCreateDefault/>
antonio@735
    95
      </column>
antonio@735
    96
      <column name="AMTACCTDR" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
    97
        <default><![CDATA[0]]></default>
antonio@735
    98
        <onCreateDefault/>
antonio@735
    99
      </column>
antonio@735
   100
      <column name="AMTACCTCR" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
antonio@735
   101
        <default><![CDATA[0]]></default>
antonio@735
   102
        <onCreateDefault/>
antonio@735
   103
      </column>
juanpablo@1605
   104
      <column name="C_UOM_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   105
        <default/>
antonio@735
   106
        <onCreateDefault/>
antonio@735
   107
      </column>
antonio@735
   108
      <column name="QTY" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   109
        <default><![CDATA[0]]></default>
antonio@735
   110
        <onCreateDefault/>
antonio@735
   111
      </column>
juanpablo@1605
   112
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   113
        <default/>
antonio@735
   114
        <onCreateDefault/>
antonio@735
   115
      </column>
juanpablo@1605
   116
      <column name="C_BPARTNER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   117
        <default/>
antonio@735
   118
        <onCreateDefault/>
antonio@735
   119
      </column>
juanpablo@1605
   120
      <column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   121
        <default/>
antonio@735
   122
        <onCreateDefault/>
antonio@735
   123
      </column>
juanpablo@1605
   124
      <column name="C_LOCFROM_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   125
        <default/>
antonio@735
   126
        <onCreateDefault/>
antonio@735
   127
      </column>
juanpablo@1605
   128
      <column name="C_LOCTO_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   129
        <default/>
antonio@735
   130
        <onCreateDefault/>
antonio@735
   131
      </column>
juanpablo@1605
   132
      <column name="C_SALESREGION_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   133
        <default/>
antonio@735
   134
        <onCreateDefault/>
antonio@735
   135
      </column>
juanpablo@1605
   136
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   137
        <default/>
antonio@735
   138
        <onCreateDefault/>
antonio@735
   139
      </column>
juanpablo@1605
   140
      <column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   141
        <default/>
antonio@735
   142
        <onCreateDefault/>
antonio@735
   143
      </column>
juanpablo@1605
   144
      <column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   145
        <default/>
antonio@735
   146
        <onCreateDefault/>
antonio@735
   147
      </column>
juanpablo@1605
   148
      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   149
        <default/>
antonio@735
   150
        <onCreateDefault/>
antonio@735
   151
      </column>
juanpablo@1605
   152
      <column name="USER2_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   153
        <default/>
antonio@735
   154
        <onCreateDefault/>
antonio@735
   155
      </column>
antonio@735
   156
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
antonio@735
   157
        <default/>
antonio@735
   158
        <onCreateDefault/>
antonio@735
   159
      </column>
juanpablo@1605
   160
      <column name="A_ASSET_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   161
        <default/>
antonio@735
   162
        <onCreateDefault/>
antonio@735
   163
      </column>
juanpablo@1605
   164
      <column name="FACT_ACCT_GROUP_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   165
        <default/>
antonio@735
   166
        <onCreateDefault/>
antonio@735
   167
      </column>
antonio@735
   168
      <column name="SEQNO" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
antonio@735
   169
        <default/>
antonio@735
   170
        <onCreateDefault/>
antonio@735
   171
      </column>
antonio@735
   172
      <column name="FACTACCTTYPE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
   173
        <default><![CDATA[N]]></default>
antonio@735
   174
        <onCreateDefault/>
antonio@735
   175
      </column>
eduardo@5072
   176
      <column name="DOCBASETYPE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false">
antonio@735
   177
        <default/>
antonio@735
   178
        <onCreateDefault/>
antonio@735
   179
      </column>
antonio@735
   180
      <column name="ACCTVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false">
antonio@735
   181
        <default/>
antonio@735
   182
        <onCreateDefault/>
antonio@735
   183
      </column>
antonio@735
   184
      <column name="ACCTDESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
antonio@735
   185
        <default/>
antonio@735
   186
        <onCreateDefault/>
antonio@735
   187
      </column>
juanpablo@1605
   188
      <column name="RECORD_ID2" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   189
        <default/>
antonio@735
   190
        <onCreateDefault/>
antonio@735
   191
      </column>
victor@4094
   192
      <column name="C_WITHHOLDING_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
victor@4094
   193
        <default/>
victor@4094
   194
        <onCreateDefault/>
victor@4094
   195
      </column>
eduardo@4400
   196
      <column name="C_DOCTYPE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
eduardo@4400
   197
        <default/>
eduardo@4400
   198
        <onCreateDefault/>
eduardo@4400
   199
      </column>
antonio@410
   200
      <foreign-key foreignTable="AD_ORG" name="AD_ORG_FACT_ACCT">
antonio@410
   201
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
carlos@0
   202
      </foreign-key>
carlos@0
   203
      <foreign-key foreignTable="AD_ORG" name="AD_ORGTRX_FACT_ACCT">
carlos@0
   204
        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
carlos@0
   205
      </foreign-key>
carlos@0
   206
      <foreign-key foreignTable="C_BPARTNER" name="C_BUSPARTNER_FACT_ACCT">
carlos@0
   207
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
carlos@0
   208
      </foreign-key>
carlos@0
   209
      <foreign-key foreignTable="C_CURRENCY" name="C_CURRENCY_FACT_ACCT">
carlos@0
   210
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
carlos@0
   211
      </foreign-key>
juanpablo@4424
   212
      <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_FACT_ACCT">
juanpablo@4424
   213
        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
juanpablo@4424
   214
      </foreign-key>
adrian@170
   215
      <foreign-key foreignTable="C_LOCATION" name="C_LOCATIONFROM_FACT_ACCT">
adrian@170
   216
        <reference local="C_LOCFROM_ID" foreign="C_LOCATION_ID"/>
carlos@0
   217
      </foreign-key>
carlos@0
   218
      <foreign-key foreignTable="C_LOCATION" name="C_LOCATIONTO_FACT_ACCT">
carlos@0
   219
        <reference local="C_LOCTO_ID" foreign="C_LOCATION_ID"/>
carlos@0
   220
      </foreign-key>
carlos@0
   221
      <foreign-key foreignTable="C_PROJECT" name="C_PROJECT_FACT_ACCT">
carlos@0
   222
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
carlos@0
   223
      </foreign-key>
carlos@0
   224
      <foreign-key foreignTable="C_SALESREGION" name="C_SALESREGION_FACTACCT">
carlos@0
   225
        <reference local="C_SALESREGION_ID" foreign="C_SALESREGION_ID"/>
carlos@0
   226
      </foreign-key>
carlos@0
   227
      <foreign-key foreignTable="C_UOM" name="C_UOM_FACT_ACCT">
carlos@0
   228
        <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
carlos@0
   229
      </foreign-key>
asier@5551
   230
      <foreign-key foreignTable="A_ASSET" name="FACT_ACCT_A_ASSET">
asier@5551
   231
        <reference local="A_ASSET_ID" foreign="A_ASSET_ID"/>
asier@5551
   232
      </foreign-key>
asier@5551
   233
      <foreign-key foreignTable="C_ELEMENTVALUE" name="FACT_ACCT_ACCOUNT">
asier@5551
   234
        <reference local="ACCOUNT_ID" foreign="C_ELEMENTVALUE_ID"/>
asier@5551
   235
      </foreign-key>
asier@5551
   236
      <foreign-key foreignTable="AD_CLIENT" name="FACT_ACCT_AD_CLIENT">
asier@5551
   237
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
asier@5551
   238
      </foreign-key>
asier@5551
   239
      <foreign-key foreignTable="AD_TABLE" name="FACT_ACCT_AD_TABLE" onDelete="cascade">
asier@5551
   240
        <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
asier@5551
   241
      </foreign-key>
asier@5551
   242
      <foreign-key foreignTable="C_ACCTSCHEMA" name="FACT_ACCT_C_ACCTSCHEMA" onDelete="cascade">
antonio@410
   243
        <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
antonio@410
   244
      </foreign-key>
asier@5551
   245
      <foreign-key foreignTable="C_ACTIVITY" name="FACT_ACCT_C_ACTIVITY">
antonio@410
   246
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
antonio@410
   247
      </foreign-key>
asier@5551
   248
      <foreign-key foreignTable="C_CAMPAIGN" name="FACT_ACCT_C_CAMPAIGN">
asier@5551
   249
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
antonio@410
   250
      </foreign-key>
asier@5551
   251
      <foreign-key foreignTable="C_PERIOD" name="FACT_ACCT_C_PERIOD">
asier@5551
   252
        <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
asier@5551
   253
      </foreign-key>
asier@5551
   254
      <foreign-key foreignTable="C_TAX" name="FACT_ACCT_C_TAX">
asier@5551
   255
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
asier@5551
   256
      </foreign-key>
asier@5551
   257
      <foreign-key foreignTable="C_WITHHOLDING" name="FACT_ACCT_C_WITHHOLDING">
asier@5551
   258
        <reference local="C_WITHHOLDING_ID" foreign="C_WITHHOLDING_ID"/>
asier@5551
   259
      </foreign-key>
asier@5551
   260
      <foreign-key foreignTable="GL_CATEGORY" name="FACT_ACCT_GL_CATEGORY">
asier@5551
   261
        <reference local="GL_CATEGORY_ID" foreign="GL_CATEGORY_ID"/>
asier@5551
   262
      </foreign-key>
asier@5551
   263
      <foreign-key foreignTable="M_LOCATOR" name="FACT_ACCT_M_LOCATOR">
asier@5551
   264
        <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
asier@5551
   265
      </foreign-key>
antonio@410
   266
      <foreign-key foreignTable="M_PRODUCT" name="M_PRODUCT_FACT_ACCT">
antonio@410
   267
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
antonio@410
   268
      </foreign-key>
adrian@94
   269
      <index name="FACT_ACCT_ACCOUNT" unique="false">
carlos@0
   270
        <index-column name="AD_CLIENT_ID"/>
carlos@0
   271
        <index-column name="AD_ORG_ID"/>
carlos@0
   272
        <index-column name="C_ACCTSCHEMA_ID"/>
carlos@0
   273
        <index-column name="ACCOUNT_ID"/>
carlos@0
   274
      </index>
adrian@94
   275
      <index name="FACT_ACCT_DATEACCT" unique="false">
carlos@0
   276
        <index-column name="DATEACCT"/>
carlos@0
   277
      </index>
adrian@94
   278
      <index name="FACT_ACCT_GROUP" unique="false">
carlos@0
   279
        <index-column name="FACT_ACCT_GROUP_ID"/>
carlos@0
   280
      </index>
adrian@94
   281
      <index name="FACT_ACCT_TABLE_RECORD_ID" unique="false">
carlos@0
   282
        <index-column name="AD_TABLE_ID"/>
carlos@0
   283
        <index-column name="RECORD_ID"/>
carlos@0
   284
      </index>
stefan@8505
   285
      <check name="FACT_ACCT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
carlos@0
   286
    </table>
adrian@94
   287
  </database>