Hello,

I have an existing table created in MySQL 4.1. The create table syntax is as
follows:

CREATE TABLE sometable
(
     deviceId INTEGER DEFAULT 0 NOT NULL,
     plexId INTEGER NOT NULL AUTO_INCREMENT,
     volumeId INTEGER,
     PRIMARY KEY (deviceId, plexId)
) ENGINE=MyISAM;

When I export this table using DdlUtils, then try to import the schema to a
new database, I get the following error:

[ddlToDatabase] SQL Command CREATE TABLE sometable
[ddlToDatabase] (
[ddlToDatabase]     deviceId INTEGER DEFAULT 0 NOT NULL,
[ddlToDatabase]     plexId INTEGER NOT NULL AUTO_INCREMENT,
[ddlToDatabase]     volumeId INTEGER,
[ddlToDatabase]     PRIMARY KEY (deviceId, plexId)
[ddlToDatabase] ) failed with: Incorrect table definition; there can be only
one auto column and it must be defined as a key

The create table syntax is failing because DdlUtils fails to append the
"ENGINE=MyISAM" to the end of the CREAT TABLE statement. Is there a way to
configure DdlUtils to do this?


Thanks,
Joe


Reply via email to