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.