DROP TABLE invalid syntax for Derby DDL export
The exported DDL of a Diagram in Derby mode with the option "With DROP TABLE statement" generate the following invalid Derby-SQL statement:
DROP TABLE IF EXISTS TABLENAME;
"IF EXISTS" is not a valid Derby-SQL syntax, just "DROP TABLE" is allowed. I did investigate this issue on Derby, but it seem there is no pure SQL solution to workaround this problem, it can only be done programmatically:
So, my proposal is to change the generation from:
DROP TABLE TABLENAME;
This will generate an exception if the table doesn't exists, but at least the syntax is correct.
I removed "IF EXISTS" from the table drop statement which is generated by DerbyDialect in the SVN trunk.
Please wait for the next release, and thanks for your feedback!