Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
MySQLAdapter has this comment in the "createTableAppendPKClause" method:
// if FK constraints are supported, we must add indices to all FKs
// Note that according to MySQL docs, FK indexes are created
// automatically when constraint is defined, starting at MySQL 4.1.2
And then it proceeds to add indexes for all FKs. This becomes a problem when a user wants to generate MySQL schema without FK constraints. In which case those columns still end up having an index. While we can refactor this in a backwards compatible manner, I think we can just drop support for explicit index creation, streamlining the code. After all MySQL 4.1.2 was released in 2004.
If someone still needs support for older MySQL, I guess a whole new adapter should be created.