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
I have encountered error retrieving constraints from a MySQL schema.
I was able to fix it by adding "limit 1" to a subquery from /database/mysql.go (line 149).
(
select kc2.CONSTRAINT_NAME is not null "isPrimary"
from information_schema.KEY_COLUMN_USAGE kc
left join information_schema.KEY_COLUMN_USAGE kc2
ON kc.COLUMN_NAME = kc2.COLUMN_NAME AND kc2.CONSTRAINT_NAME = 'PRIMARY' AND
kc2.TABLE_NAME = kc.TABLE_NAME
where kc.CONSTRAINT_NAME = c.CONSTRAINT_NAME and kc.COLUMN_NAME = kcu.COLUMN_NAME limit 1
) "isPrimary",
The error occured because the subquery was returning more than one row in my case.
Best regards.
The text was updated successfully, but these errors were encountered:
Hi! Thanks for this useful tool.
I have encountered error retrieving constraints from a MySQL schema.
I was able to fix it by adding "limit 1" to a subquery from /database/mysql.go (line 149).
The error occured because the subquery was returning more than one row in my case.
Best regards.
The text was updated successfully, but these errors were encountered: