src-db/database/model/tables/I_INVOICE.xml
author Stefan Hühner <stefan.huehner@openbravo.com>
Thu, 07 Oct 2010 16:53:30 +0200
changeset 8505 a2bb7e6fb443
parent 8504 802eae4a434d
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 I_INVOICE">
carlos@0
     3
    <table name="I_INVOICE" primaryKey="I_INVOICE_KEY">
juanpablo@1605
     4
      <column name="I_INVOICE_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="false" 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="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    13
        <default/>
antonio@735
    14
        <onCreateDefault/>
antonio@735
    15
      </column>
juanpablo@1605
    16
      <column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    17
        <default/>
antonio@735
    18
        <onCreateDefault/>
antonio@735
    19
      </column>
antonio@735
    20
      <column name="ISACTIVE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
    21
        <default><![CDATA[Y]]></default>
antonio@735
    22
        <onCreateDefault/>
antonio@735
    23
      </column>
antonio@735
    24
      <column name="CREATED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    25
        <default><![CDATA[SYSDATE]]></default>
antonio@735
    26
        <onCreateDefault/>
antonio@735
    27
      </column>
juanpablo@1605
    28
      <column name="CREATEDBY" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    29
        <default/>
antonio@735
    30
        <onCreateDefault/>
antonio@735
    31
      </column>
antonio@735
    32
      <column name="UPDATED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
antonio@735
    33
        <default><![CDATA[SYSDATE]]></default>
antonio@735
    34
        <onCreateDefault/>
antonio@735
    35
      </column>
juanpablo@1605
    36
      <column name="UPDATEDBY" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    37
        <default/>
antonio@735
    38
        <onCreateDefault/>
antonio@735
    39
      </column>
antonio@735
    40
      <column name="I_ISIMPORTED" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
    41
        <default><![CDATA[N]]></default>
antonio@735
    42
        <onCreateDefault/>
antonio@735
    43
      </column>
antonio@735
    44
      <column name="I_ERRORMSG" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false">
antonio@735
    45
        <default/>
antonio@735
    46
        <onCreateDefault/>
antonio@735
    47
      </column>
antonio@735
    48
      <column name="PROCESSING" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
    49
        <default/>
antonio@735
    50
        <onCreateDefault/>
antonio@735
    51
      </column>
antonio@735
    52
      <column name="PROCESSED" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
    53
        <default><![CDATA[N]]></default>
antonio@735
    54
        <onCreateDefault/>
antonio@735
    55
      </column>
juanpablo@1605
    56
      <column name="M_PRICELIST_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    57
        <default/>
antonio@735
    58
        <onCreateDefault/>
antonio@735
    59
      </column>
juanpablo@1605
    60
      <column name="C_CURRENCY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    61
        <default/>
antonio@735
    62
        <onCreateDefault/>
antonio@735
    63
      </column>
juanpablo@1605
    64
      <column name="SALESREP_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    65
        <default/>
antonio@735
    66
        <onCreateDefault/>
antonio@735
    67
      </column>
antonio@735
    68
      <column name="ISSOTRX" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
antonio@735
    69
        <default><![CDATA[Y]]></default>
antonio@735
    70
        <onCreateDefault/>
antonio@735
    71
      </column>
juanpablo@1605
    72
      <column name="C_BPARTNER_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="C_BPARTNER_LOCATION_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    77
        <default/>
antonio@735
    78
        <onCreateDefault/>
antonio@735
    79
      </column>
antonio@735
    80
      <column name="BPARTNERVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false">
antonio@735
    81
        <default/>
antonio@735
    82
        <onCreateDefault/>
antonio@735
    83
      </column>
antonio@735
    84
      <column name="NAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false">
antonio@735
    85
        <default/>
antonio@735
    86
        <onCreateDefault/>
antonio@735
    87
      </column>
juanpablo@1605
    88
      <column name="C_LOCATION_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
    89
        <default/>
antonio@735
    90
        <onCreateDefault/>
antonio@735
    91
      </column>
antonio@735
    92
      <column name="ADDRESS1" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false">
antonio@735
    93
        <default/>
antonio@735
    94
        <onCreateDefault/>
antonio@735
    95
      </column>
antonio@735
    96
      <column name="ADDRESS2" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false">
antonio@735
    97
        <default/>
antonio@735
    98
        <onCreateDefault/>
antonio@735
    99
      </column>
antonio@735
   100
      <column name="POSTAL" primaryKey="false" required="false" type="VARCHAR" size="10" autoIncrement="false">
antonio@735
   101
        <default/>
antonio@735
   102
        <onCreateDefault/>
antonio@735
   103
      </column>
antonio@735
   104
      <column name="CITY" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false">
antonio@735
   105
        <default/>
antonio@735
   106
        <onCreateDefault/>
antonio@735
   107
      </column>
juanpablo@1605
   108
      <column name="C_REGION_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   109
        <default/>
antonio@735
   110
        <onCreateDefault/>
antonio@735
   111
      </column>
antonio@735
   112
      <column name="REGIONNAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false">
antonio@735
   113
        <default/>
antonio@735
   114
        <onCreateDefault/>
antonio@735
   115
      </column>
juanpablo@1605
   116
      <column name="AD_USER_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   117
        <default/>
antonio@735
   118
        <onCreateDefault/>
antonio@735
   119
      </column>
antonio@735
   120
      <column name="EMAIL" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false">
antonio@735
   121
        <default/>
antonio@735
   122
        <onCreateDefault/>
antonio@735
   123
      </column>
antonio@735
   124
      <column name="CONTACTNAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false">
antonio@735
   125
        <default/>
antonio@735
   126
        <onCreateDefault/>
antonio@735
   127
      </column>
antonio@735
   128
      <column name="PHONE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false">
antonio@735
   129
        <default/>
antonio@735
   130
        <onCreateDefault/>
antonio@735
   131
      </column>
juanpablo@1605
   132
      <column name="C_COUNTRY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   133
        <default/>
antonio@735
   134
        <onCreateDefault/>
antonio@735
   135
      </column>
antonio@735
   136
      <column name="COUNTRYCODE" primaryKey="false" required="false" type="CHAR" size="2" autoIncrement="false">
antonio@735
   137
        <default/>
antonio@735
   138
        <onCreateDefault/>
antonio@735
   139
      </column>
juanpablo@1605
   140
      <column name="C_DOCTYPE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   141
        <default/>
antonio@735
   142
        <onCreateDefault/>
antonio@735
   143
      </column>
antonio@735
   144
      <column name="DOCTYPENAME" primaryKey="false" required="false" type="NVARCHAR" size="60" autoIncrement="false">
antonio@735
   145
        <default/>
antonio@735
   146
        <onCreateDefault/>
antonio@735
   147
      </column>
juanpablo@1605
   148
      <column name="C_PAYMENTTERM_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   149
        <default/>
antonio@735
   150
        <onCreateDefault/>
antonio@735
   151
      </column>
antonio@735
   152
      <column name="PAYMENTTERMVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false">
antonio@735
   153
        <default/>
antonio@735
   154
        <onCreateDefault/>
antonio@735
   155
      </column>
juanpablo@1605
   156
      <column name="C_PROJECT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   157
        <default/>
antonio@735
   158
        <onCreateDefault/>
antonio@735
   159
      </column>
juanpablo@1605
   160
      <column name="C_CAMPAIGN_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="C_ACTIVITY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   165
        <default/>
antonio@735
   166
        <onCreateDefault/>
antonio@735
   167
      </column>
juanpablo@1605
   168
      <column name="C_INVOICE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   169
        <default/>
antonio@735
   170
        <onCreateDefault/>
antonio@735
   171
      </column>
antonio@735
   172
      <column name="DOCUMENTNO" primaryKey="false" required="false" type="NVARCHAR" size="30" autoIncrement="false">
antonio@735
   173
        <default/>
antonio@735
   174
        <onCreateDefault/>
antonio@735
   175
      </column>
antonio@735
   176
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
antonio@735
   177
        <default/>
antonio@735
   178
        <onCreateDefault/>
antonio@735
   179
      </column>
juanpablo@1605
   180
      <column name="M_PRODUCT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   181
        <default/>
antonio@735
   182
        <onCreateDefault/>
antonio@735
   183
      </column>
antonio@735
   184
      <column name="PRODUCTVALUE" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false">
antonio@735
   185
        <default/>
antonio@735
   186
        <onCreateDefault/>
antonio@735
   187
      </column>
antonio@735
   188
      <column name="UPC" primaryKey="false" required="false" type="NVARCHAR" size="30" autoIncrement="false">
antonio@735
   189
        <default/>
antonio@735
   190
        <onCreateDefault/>
antonio@735
   191
      </column>
antonio@735
   192
      <column name="SKU" primaryKey="false" required="false" type="NVARCHAR" size="30" autoIncrement="false">
antonio@735
   193
        <default/>
antonio@735
   194
        <onCreateDefault/>
antonio@735
   195
      </column>
juanpablo@1605
   196
      <column name="C_TAX_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   197
        <default/>
antonio@735
   198
        <onCreateDefault/>
antonio@735
   199
      </column>
antonio@735
   200
      <column name="TAXINDICATOR" primaryKey="false" required="false" type="VARCHAR" size="5" autoIncrement="false">
antonio@735
   201
        <default/>
antonio@735
   202
        <onCreateDefault/>
antonio@735
   203
      </column>
antonio@735
   204
      <column name="TAXAMT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   205
        <default><![CDATA[0]]></default>
antonio@735
   206
        <onCreateDefault/>
antonio@735
   207
      </column>
juanpablo@1605
   208
      <column name="C_INVOICELINE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
antonio@735
   209
        <default/>
antonio@735
   210
        <onCreateDefault/>
antonio@735
   211
      </column>
antonio@735
   212
      <column name="LINEDESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
antonio@735
   213
        <default/>
antonio@735
   214
        <onCreateDefault/>
antonio@735
   215
      </column>
antonio@735
   216
      <column name="QTYORDERED" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   217
        <default><![CDATA[0]]></default>
antonio@735
   218
        <onCreateDefault/>
antonio@735
   219
      </column>
antonio@735
   220
      <column name="PRICEACTUAL" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
antonio@735
   221
        <default><![CDATA[0]]></default>
antonio@735
   222
        <onCreateDefault/>
antonio@735
   223
      </column>
asier@5551
   224
      <foreign-key foreignTable="AD_CLIENT" name="I_INVOICE_AD_CLIENT">
carlos@0
   225
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
   226
      </foreign-key>
asier@5551
   227
      <foreign-key foreignTable="AD_ORG" name="I_INVOICE_AD_ORG">
antonio@410
   228
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
antonio@410
   229
      </foreign-key>
asier@5551
   230
      <foreign-key foreignTable="AD_ORG" name="I_INVOICE_AD_ORGTRX">
gorkaion@238
   231
        <reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
gorkaion@238
   232
      </foreign-key>
asier@5551
   233
      <foreign-key foreignTable="AD_USER" name="I_INVOICE_AD_USER">
carlos@0
   234
        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
carlos@0
   235
      </foreign-key>
asier@5551
   236
      <foreign-key foreignTable="C_ACTIVITY" name="I_INVOICE_C_ACTIVITY">
carlos@0
   237
        <reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
carlos@0
   238
      </foreign-key>
asier@5551
   239
      <foreign-key foreignTable="C_BPARTNER" name="I_INVOICE_C_BPARTNER">
carlos@0
   240
        <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
carlos@0
   241
      </foreign-key>
asier@5551
   242
      <foreign-key foreignTable="C_BPARTNER_LOCATION" name="I_INVOICE_C_BPARTNER_LOCATION">
carlos@0
   243
        <reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
carlos@0
   244
      </foreign-key>
asier@5551
   245
      <foreign-key foreignTable="C_CAMPAIGN" name="I_INVOICE_C_CAMPAIGN">
carlos@0
   246
        <reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
carlos@0
   247
      </foreign-key>
asier@5551
   248
      <foreign-key foreignTable="C_COUNTRY" name="I_INVOICE_C_COUNTRY">
carlos@0
   249
        <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
carlos@0
   250
      </foreign-key>
asier@5551
   251
      <foreign-key foreignTable="C_CURRENCY" name="I_INVOICE_C_CURRENCY">
carlos@0
   252
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
carlos@0
   253
      </foreign-key>
asier@5551
   254
      <foreign-key foreignTable="C_DOCTYPE" name="I_INVOICE_C_DOCTYPE">
carlos@0
   255
        <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
carlos@0
   256
      </foreign-key>
asier@5551
   257
      <foreign-key foreignTable="C_INVOICE" name="I_INVOICE_C_INVOICE">
asier@5551
   258
        <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
asier@5551
   259
      </foreign-key>
asier@5551
   260
      <foreign-key foreignTable="C_INVOICELINE" name="I_INVOICE_C_INVOICELINE">
adrian@170
   261
        <reference local="C_INVOICELINE_ID" foreign="C_INVOICELINE_ID"/>
adrian@170
   262
      </foreign-key>
asier@5551
   263
      <foreign-key foreignTable="C_LOCATION" name="I_INVOICE_C_LOCATION">
carlos@0
   264
        <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
carlos@0
   265
      </foreign-key>
asier@5551
   266
      <foreign-key foreignTable="C_PAYMENTTERM" name="I_INVOICE_C_PAYMENTTERM">
carlos@0
   267
        <reference local="C_PAYMENTTERM_ID" foreign="C_PAYMENTTERM_ID"/>
carlos@0
   268
      </foreign-key>
asier@5551
   269
      <foreign-key foreignTable="C_PROJECT" name="I_INVOICE_C_PROJECT">
carlos@0
   270
        <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
carlos@0
   271
      </foreign-key>
asier@5551
   272
      <foreign-key foreignTable="C_REGION" name="I_INVOICE_C_REGION">
carlos@0
   273
        <reference local="C_REGION_ID" foreign="C_REGION_ID"/>
carlos@0
   274
      </foreign-key>
asier@5551
   275
      <foreign-key foreignTable="C_TAX" name="I_INVOICE_C_TAX">
carlos@0
   276
        <reference local="C_TAX_ID" foreign="C_TAX_ID"/>
carlos@0
   277
      </foreign-key>
asier@5551
   278
      <foreign-key foreignTable="M_PRICELIST" name="I_INVOICE_M_PRICELIST">
carlos@0
   279
        <reference local="M_PRICELIST_ID" foreign="M_PRICELIST_ID"/>
carlos@0
   280
      </foreign-key>
asier@5551
   281
      <foreign-key foreignTable="M_PRODUCT" name="I_INVOICE_M_PRODUCT">
carlos@0
   282
        <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
carlos@0
   283
      </foreign-key>
asier@5551
   284
      <foreign-key foreignTable="AD_USER" name="I_INVOICE_SALESREP">
adrian@170
   285
        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
adrian@170
   286
      </foreign-key>
stefan@8505
   287
      <check name="I_INVOICE_I_ISIMPORTED_CHECK"><![CDATA[I_ISIMPORTED IN ('Y', 'N')]]></check>
stefan@8505
   288
      <check name="I_INVOICE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
stefan@8505
   289
      <check name="I_INVOICE_ISSOTRX_CHECK"><![CDATA[ISSOTRX IN ('Y', 'N')]]></check>
stefan@8505
   290
      <check name="I_INVOICE_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
carlos@0
   291
    </table>
adrian@94
   292
  </database>