database/model/tables/AD_TABLE.xml
author Adrián Romero <adrian.romero@openbravo.com>
Tue, 20 Nov 2007 16:27:14 +0000
changeset 94 4e7ba7b8a4ad
parent 0 0247c26f10c6
child 170 4b5493776a7f
permissions -rw-r--r--
fix: Changed check constraint names and foreign key names to fit in to
30 characteres.
carlos@0
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="TABLE AD_TABLE">
carlos@0
     3
    <table name="AD_TABLE" primaryKey="AD_TABLE_KEY">
carlos@0
     4
      <column name="AD_TABLE_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="NAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false"/>
carlos@0
    13
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false"/>
carlos@0
    14
      <column name="HELP" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false"/>
carlos@0
    15
      <column name="TABLENAME" primaryKey="false" required="true" type="VARCHAR" size="40" autoIncrement="false"/>
carlos@0
    16
      <column name="ISVIEW" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
carlos@0
    17
      <column name="ACCESSLEVEL" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false"/>
carlos@0
    18
      <column name="ENTITYTYPE" primaryKey="false" required="false" type="CHAR" size="1" default="D" autoIncrement="false"/>
carlos@0
    19
      <column name="AD_WINDOW_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    20
      <column name="AD_VAL_RULE_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    21
      <column name="LOADSEQ" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    22
      <column name="ISSECURITYENABLED" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
carlos@0
    23
      <column name="ISDELETEABLE" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
carlos@0
    24
      <column name="ISHIGHVOLUME" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
carlos@0
    25
      <column name="IMPORTTABLE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false"/>
carlos@0
    26
      <column name="ISCHANGELOG" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
carlos@0
    27
      <column name="REPLICATIONTYPE" primaryKey="false" required="false" type="CHAR" size="1" default="L" autoIncrement="false"/>
carlos@0
    28
      <column name="PO_WINDOW_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false"/>
carlos@0
    29
      <column name="ISDEFAULTACCT" primaryKey="false" required="false" type="CHAR" size="1" default="N" autoIncrement="false"/>
carlos@0
    30
      <column name="SQL_RECORD_IDENTIFIER" primaryKey="false" required="false" type="VARCHAR" size="4000" autoIncrement="false"/>
carlos@0
    31
      <column name="DEVELOPMENTSTATUS" primaryKey="false" required="false" type="VARCHAR" size="2" default="RE" autoIncrement="false"/>
carlos@0
    32
      <foreign-key foreignTable="AD_CLIENT" name="TABLECLIENT">
carlos@0
    33
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
carlos@0
    34
      </foreign-key>
carlos@0
    35
      <foreign-key foreignTable="AD_ORG" name="TABLEORG">
carlos@0
    36
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
carlos@0
    37
      </foreign-key>
carlos@0
    38
      <foreign-key foreignTable="AD_VAL_RULE" name="AD_VALRULE_TABLE">
carlos@0
    39
        <reference local="AD_VAL_RULE_ID" foreign="AD_VAL_RULE_ID"/>
carlos@0
    40
      </foreign-key>
adrian@94
    41
      <foreign-key foreignTable="AD_WINDOW" name="AD_WINDOW_TABLE" onDelete="setnull">
carlos@0
    42
        <reference local="AD_WINDOW_ID" foreign="AD_WINDOW_ID"/>
carlos@0
    43
      </foreign-key>
carlos@0
    44
      <unique name="AD_TABLE_NAME">
carlos@0
    45
        <unique-column name="NAME"/>
carlos@0
    46
      </unique>
adrian@94
    47
      <check name="ADTABLE_ISACTIVE_CHECK" condition="IsActive in (&apos;Y&apos;,&apos;N&apos;)"/>
adrian@94
    48
      <check name="ADTABLE_ISVIEW_CHECK" condition="IsView in (&apos;Y&apos;,&apos;N&apos;)"/>
adrian@94
    49
      <check name="ADTABLE_ISSECUR_YENABLED_CHECK" condition="IsSecurityEnabled in (&apos;Y&apos;,&apos;N&apos;)"/>
adrian@94
    50
      <check name="ADTABLE_ISDELETEABLE_CHECK" condition="IsDeleteable in (&apos;Y&apos;,&apos;N&apos;)"/>
adrian@94
    51
      <check name="ADTABLE_ISHIGHVOLUME_CHECK" condition="IsHighVolume in (&apos;Y&apos;,&apos;N&apos;)"/>
carlos@0
    52
    </table>
adrian@94
    53
  </database>