You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Thomas Dudziak (JIRA)" <ji...@apache.org> on 2006/07/30 06:57:15 UTC

[jira] Resolved: (DDLUTILS-19) index tag and unique tag exists in dtd but DatabaseIO().write generate XML without index and unique elements

     [ http://issues.apache.org/jira/browse/DDLUTILS-19?page=all ]

Thomas Dudziak resolved DDLUTILS-19.
------------------------------------

    Resolution: Fixed

Is fixed. The returned XML is now:

  <database name="default">
    <table name="mfg_batchtype">
      <column name="id" primaryKey="true" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
      <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
      <column name="ad_org_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
      <column name="isactive" primaryKey="false" required="true" type="VARCHAR" size="1" default="Y" autoIncrement="false"/>
      <column name="created" primaryKey="false" required="true" type="TIMESTAMP" size="8,6" default="(&apos;now&apos;::text)::timestamp(6) with time zone" autoIncrement="false"/>
      <column name="createdby" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
      <column name="updated" primaryKey="false" required="true" type="TIMESTAMP" size="8,6" default="(&apos;now&apos;::text)::timestamp(6) with time zone" autoIncrement="false"/>
      <column name="updatedby" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
      <column name="name" primaryKey="false" required="true" type="VARCHAR" size="200" autoIncrement="false"/>
      <column name="no_version" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"/>
      <column name="description" primaryKey="false" required="true" type="VARCHAR" size="2000" autoIncrement="false" description="Cycle, one shot or when completed"/>
      <column name="cycle_time" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false" description="if batch type is cycle"/>
      <column name="cycle_qty" primaryKey="false" required="true" type="DOUBLE" size="8" autoIncrement="false" description="Number of work orders to introduce when WIP minimum is reached"/>
      <index name="mfg_batchtypendx1">
        <index-column name="id"/>
      </index>
    </table>
  </database>


As for the comments, see DDLUTILS-121

> index tag and unique tag exists in dtd but DatabaseIO().write generate XML without index and unique elements
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: DDLUTILS-19
>                 URL: http://issues.apache.org/jira/browse/DDLUTILS-19
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core (No specific database)
>         Environment: Linux Fedora 4 jdk1.5.0_04
>            Reporter: Andre Charles Legendre
>         Assigned To: Thomas Dudziak
>             Fix For: 1.0
>
>
> index tag and unique tag exists in both dtd but I
> found no index element nor unique element created when
> I have generated XML from our database using
> DatabaseIO().write
> For example a postgres table created by :
> CREATE TABLE MFG_BatchType
>   (
>     Id            numeric(10,0)   unique not null,
>     AD_Client_ID  numeric(10,0)   not null,
>     AD_Org_ID     numeric(10,0)   not null,
>     IsActive      varchar(1)      not null default 'Y',
>     Created       timestamp       not null default CURRENT_TIMESTAMP,
>     CreatedBy     numeric(10,0)   not null,
>     Updated       timestamp       not null default CURRENT_TIMESTAMP,
>     UpdatedBy     numeric(10,0)   not null,
>     Name          varchar(200)    not null,
>     No_version    varchar(32)     not null,
>     Description   varchar(2000)   not null,
>     Cycle_Time    numeric(10,0)   not null,
>     Cycle_Qty     float8          not null,
>     primary key(Id)
>   );
> CREATE INDEX MFG_BatchTypeNDX1 ON MFG_BatchType(Id);
> -- ----------------------------------------------------------------------
> COMMENT ON COLUMN MFG_BatchType.Description is 'Cycle, one shot or when completed';
> COMMENT ON COLUMN MFG_BatchType.Cycle_Time is 'if batch type is cycle';
> COMMENT ON COLUMN MFG_BatchType.Cycle_Qty is 'Number of work orders to introduce when WIP minimum is reached';
> Give this XML :
>     <table name="mfg_batchtype">
>       <column name="id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="ad_org_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="isactive" primaryKey="false" required="true" type="VARCHAR" size="1" default="&apos;Y&apos;::character varying" autoIncrement="false"/>
>       <column name="created" primaryKey="false" required="true" type="TIMESTAMP" size="8" default="(&apos;now&apos;::text)::timestamp(6) with time zone" autoIncrement="false"/>
>       <column name="createdby" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="updated" primaryKey="false" required="true" type="TIMESTAMP" size="8" default="(&apos;now&apos;::text)::timestamp(6) with time zone" autoIncrement="false"/>
>       <column name="updatedby" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="name" primaryKey="false" required="true" type="VARCHAR" size="200" autoIncrement="false"/>
>       <column name="no_version" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"/>
>       <column name="description" primaryKey="false" required="true" type="VARCHAR" size="2000" autoIncrement="false"/>
>       <column name="cycle_time" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="cycle_qty" primaryKey="false" required="true" type="DOUBLE" size="8" autoIncrement="false"/>
>     </table>
> As you can see index and comment disapear for comment, it is not an issue but for index yes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira