Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.0
-
None
Description
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>