database/model/tables/AD_TREEBAR.xml
author Adrián Romero <adrian.romero@openbravo.com>
Tue, 20 Nov 2007 16:27:14 +0000
changeset 94 4e7ba7b8a4ad
parent 0 0247c26f10c6
child 238 006d2d0fdea6
permissions -rw-r--r--
fix: Changed check constraint names and foreign key names to fit in to
30 characteres.
<?xml version="1.0"?>
  <database name="TABLE AD_TREEBAR">
    <table name="AD_TREEBAR" primaryKey="AD_TREEBAR_KEY">
      <column name="AD_TREE_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="AD_USER_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false"/>
      <column name="NODE_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"/>
      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADTREEBAR">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="ADORG_ADTREEBAR">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_TREE" name="ADTREE_ADTREEBAR" onDelete="cascade">
        <reference local="AD_TREE_ID" foreign="AD_TREE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_USER" name="ADUSER_ADTREEBAR" onDelete="cascade">
        <reference local="AD_USER_ID" foreign="AD_USER_ID"/>
      </foreign-key>
      <check name="AD_TREEBAR_ISACTIVE_CHECK" condition="IsActive in (&apos;Y&apos;,&apos;N&apos;)"/>
    </table>
  </database>