You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MySQL does this thing where it generates indexes for foreign keys, unless you already have one defined. The issue is that the mysql5 driver can only accurately detect this for the single-column case, since composite foreign keys are defined as explicit SQL in a <constraint> tag.
The solution for this is to create a new <foreignKey> element which acts as an alternative to a <constraint>, and explicitly defines source and target columns for the foreign key. This will allow both mysql5 and pgsql8 drivers to better handle validation and bizarre behavior.
This functionality needs added to both mysql5 and pgsql8 drivers, for:
Extraction: Extract composite foreign keys as foreignKey elements, rather than constraint elements
XML Parsing: Need to ensure overlays work correctly, and that referenced source columns exist in the current table, and that referenced target columns exist in the target table.
SQL Output: Need to generate correct DDL for creating/updating/dropping a foreignKey element. It will probably be easiest to just have the existing constraint system recognize foreignKey as a type of constraint, similar to column unique, column foreign keys, or actual <constraint>s.
MySQL does this thing where it generates indexes for foreign keys, unless you already have one defined. The issue is that the mysql5 driver can only accurately detect this for the single-column case, since composite foreign keys are defined as explicit SQL in a
<constraint>
tag.The solution for this is to create a new
<foreignKey>
element which acts as an alternative to a<constraint>
, and explicitly defines source and target columns for the foreign key. This will allow both mysql5 and pgsql8 drivers to better handle validation and bizarre behavior.This functionality needs added to both mysql5 and pgsql8 drivers, for:
<constraint>
s.An example foreignKey definition would be:
foreignSchema
may be omitted if theforeignTable
is in the current schema.foreignColumns
may be omitted if the columns are named the same as those listed incolumns
.constraintName
defines what the name of the constraint should be.indexName
is optional, and serves as a hint for mysql to name the corresponding "magic index"The text was updated successfully, but these errors were encountered: