modules/org.openbravo.service.datasource/src-db/database/model/tables/OBSERDS_DATASOURCE_FIELD.xml
author Harpreet Singh <harpreet@openbravo.com>
Fri, 10 Dec 2010 19:47:45 +0100
changeset 9076 c4f1a5c7d7c2
permissions -rw-r--r--
Added 3.0 modules to modules dir and changed the VERSION number
<?xml version="1.0"?>
  <database name="TABLE OBSERDS_DATASOURCE_FIELD">
    <table name="OBSERDS_DATASOURCE_FIELD" primaryKey="OBSERDS_DATASOURCE_FIELD_PK">
      <column name="OBSERDS_DATASOURCE_FIELD_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="OBSERDS_DATASOURCE_ID" primaryKey="false" 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="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="AD_REFERENCE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="AD_TABLE_ID" primaryKey="false" required="false" 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>
      <foreign-key foreignTable="AD_CLIENT" name="OBSERDS_DSF_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="OBSERDS_DSF_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_REFERENCE" name="OBSERDS_DSF_AD_REF">
        <reference local="AD_REFERENCE_ID" foreign="AD_REFERENCE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_TABLE" name="OBSERDS_DSF_AD_TABLE">
        <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="OBSERDS_DATASOURCE" name="OBSERDS_DSF_DS" onDelete="cascade">
        <reference local="OBSERDS_DATASOURCE_ID" foreign="OBSERDS_DATASOURCE_ID"/>
      </foreign-key>
      <unique name="OBSERDS_DATASOURCE_FIELD_NAME">
        <unique-column name="OBSERDS_DATASOURCE_ID"/>
        <unique-column name="NAME"/>
      </unique>
      <check name="OBSERDS_DSF_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>