]
Barry LaFond resolved TEIIDDES-2112.
------------------------------------
Resolution: Done
added check in MYSQL xslt for PK's named "PRIMARY" and use the alternate ADD
PRIMARY KEY and skip ADD CONSTRAINT
Done
Need to correct the generated MySQL DDL for Primary Keys
--------------------------------------------------------
Key: TEIIDDES-2112
URL:
https://issues.jboss.org/browse/TEIIDDES-2112
Project: Teiid Designer
Issue Type: Bug
Components: Import/Export
Affects Versions: 8.4
Reporter: Mark Drilling
Assignee: Barry LaFond
Fix For: 8.5
The generated DDL for MySQL primary keys needs to be adjusted to account for the case
where the user names their PK to PRIMARY.
We currently generate DDL of the following form for MySQL
ALTER TABLE <tableName>
ADD CONSTRAINT <pkName>
PRIMARY KEY (<colName>);
For a key named PRIMARY this results in DDL that fails on MySQL. We should change the
form for MySQL to be
ALTER TABLE <tableName> ADD PRIMARY KEY (<colName>);
On MySQL the PK is forced to be named PRIMARY, so its not possible to set the name
anyway.