src-db/database/model/tables/C_SALESREGION.xml
author Martin Taal <martin.taal@openbravo.com>
Wed, 28 Jan 2009 14:17:33 +0000
changeset 2771 3c2361b78745
parent 1605 8a0fe0193bef
child 5551 7a30caea85b5
permissions -rw-r--r--
Fixes issue 7184, Database model validation should only log errors not stop dal-initialize process
Added missing foreign key constraints
Updated sample data, the identifier definition was apparently updated
<?xml version="1.0"?>
  <database name="TABLE C_SALESREGION">
    <table name="C_SALESREGION" primaryKey="C_SALESREGION_KEY">
      <column name="C_SALESREGION_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[Y]]></default>
        <onCreateDefault/>
      </column>
      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default><![CDATA[SYSDATE]]></default>
        <onCreateDefault/>
      </column>
      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default><![CDATA[SYSDATE]]></default>
        <onCreateDefault/>
      </column>
      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="VALUE" primaryKey="false" required="true" type="NVARCHAR" size="40" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="NAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ISSUMMARY" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault/>
      </column>
      <column name="SALESREP_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="ISDEFAULT" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_CSALESREGION">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="ADORG_CSALESREGION">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_USER" name="C_SALESREGION_AD_USER">
        <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
      </foreign-key>
      <unique name="C_SALESREGION_VALUE">
        <unique-column name="AD_CLIENT_ID"/>
        <unique-column name="VALUE"/>
      </unique>
      <check name="C_SALESREGION_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>