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 2008/02/18 22:20:34 UTC
[jira] Created: (DDLUTILS-193) Empty string default values not
written to generated XML
Empty string default values not written to generated XML
--------------------------------------------------------
Key: DDLUTILS-193
URL: https://issues.apache.org/jira/browse/DDLUTILS-193
Project: DdlUtils
Issue Type: Bug
Components: Core (No specific database)
Affects Versions: 1.0
Reporter: Thomas Dudziak
Assignee: Thomas Dudziak
Fix For: 1.1
As per the problem reported by Satish Yellanki on the user mailing list, a table defined in MySql as:
CREATE TABLE mytable (
column1 int(10) unsigned NOT NULL default '0',
column2 varchar(45) NOT NULL default '',
column3 varchar(7) NOT NULL default '',
column4 tinyint(3) unsigned default NULL,
column5 varchar(45) default NULL,
PRIMARY KEY (column1)
)
will result in this XML:
<?xml version='1.0' encoding='UTF-8'?>
<database name="unnamed">
<table name="mytable" description="">
<column name="column1" primaryKey="true" required="true" type="INTEGER" size="10" default="0" autoIncrement="false" />
<column name="column2" primaryKey="false" required="true" type="VARCHAR" size="45" autoIncrement="false" />
<column name="column3" primaryKey="false" required="true" type="VARCHAR" size="7" autoIncrement="false" />
<column name="column4" primaryKey="false" required="false" type="TINYINT" size="3" autoIncrement="false" />
<column name="column5" primaryKey="false" required="false" type="VARCHAR" size="45" autoIncrement="false" />
</table>
</database>
which is missing the default attributes for column2 and c olumn3. Instead the XML should look like this:
<?xml version='1.0' encoding='UTF-8'?>
<database name="unnamed">
<table name="mytable" description="">
<column name="column1" primaryKey="true" required="true" type="INTEGER" size="10" default="0" autoIncrement="false" />
<column name="column2" primaryKey="false" required="true" type="VARCHAR" size="45" default="" autoIncrement="false" />
<column name="column3" primaryKey="false" required="true" type="VARCHAR" size="7" default="" autoIncrement="false" />
<column name="column4" primaryKey="false" required="false" type="TINYINT" size="3" autoIncrement="false" />
<column name="column5" primaryKey="false" required="false" type="VARCHAR" size="45" autoIncrement="false" />
</table>
</database>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DDLUTILS-193) Empty string default values not
written to generated XML
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DDLUTILS-193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Dudziak resolved DDLUTILS-193.
-------------------------------------
Resolution: Fixed
> Empty string default values not written to generated XML
> --------------------------------------------------------
>
> Key: DDLUTILS-193
> URL: https://issues.apache.org/jira/browse/DDLUTILS-193
> Project: DdlUtils
> Issue Type: Bug
> Components: Core (No specific database)
> Affects Versions: 1.0
> Reporter: Thomas Dudziak
> Assignee: Thomas Dudziak
> Fix For: 1.1
>
>
> As per the problem reported by Satish Yellanki on the user mailing list, a table defined in MySql as:
> CREATE TABLE mytable (
> column1 int(10) unsigned NOT NULL default '0',
> column2 varchar(45) NOT NULL default '',
> column3 varchar(7) NOT NULL default '',
> column4 tinyint(3) unsigned default NULL,
> column5 varchar(45) default NULL,
> PRIMARY KEY (column1)
> )
> will result in this XML:
> <?xml version='1.0' encoding='UTF-8'?>
> <database name="unnamed">
> <table name="mytable" description="">
> <column name="column1" primaryKey="true" required="true" type="INTEGER" size="10" default="0" autoIncrement="false" />
> <column name="column2" primaryKey="false" required="true" type="VARCHAR" size="45" autoIncrement="false" />
> <column name="column3" primaryKey="false" required="true" type="VARCHAR" size="7" autoIncrement="false" />
> <column name="column4" primaryKey="false" required="false" type="TINYINT" size="3" autoIncrement="false" />
> <column name="column5" primaryKey="false" required="false" type="VARCHAR" size="45" autoIncrement="false" />
> </table>
> </database>
> which is missing the default attributes for column2 and c olumn3. Instead the XML should look like this:
> <?xml version='1.0' encoding='UTF-8'?>
> <database name="unnamed">
> <table name="mytable" description="">
> <column name="column1" primaryKey="true" required="true" type="INTEGER" size="10" default="0" autoIncrement="false" />
> <column name="column2" primaryKey="false" required="true" type="VARCHAR" size="45" default="" autoIncrement="false" />
> <column name="column3" primaryKey="false" required="true" type="VARCHAR" size="7" default="" autoIncrement="false" />
> <column name="column4" primaryKey="false" required="false" type="TINYINT" size="3" autoIncrement="false" />
> <column name="column5" primaryKey="false" required="false" type="VARCHAR" size="45" autoIncrement="false" />
> </table>
> </database>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.