src-db/database/model/tables/AD_IMAGE.xml
author Antonio Moreno <antonio.moreno@openbravo.com>
Tue, 26 Jul 2011 18:10:49 +0200
changeset 13288 3f2583bb1884
parent 13059 27451b6701f2
child 20246 ad7168af39fc
permissions -rw-r--r--
[imageBLOB] Fixed issue 18082. Image size and mime type will be saved and reused to increase performance.
<?xml version="1.0"?>
  <database name="TABLE AD_IMAGE">
    <table name="AD_IMAGE" primaryKey="AD_IMAGE_KEY">
      <column name="AD_IMAGE_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="NAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="IMAGEURL" primaryKey="false" required="false" type="NVARCHAR" size="120" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="BINARYDATA" primaryKey="false" required="false" type="BLOB" size="4000" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="WIDTH" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="HEIGHT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="MIMETYPE" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="AD_IMAGE_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="AD_IMAGE_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <check name="AD_IMAGE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
    </table>
  </database>