distal-attribute
distal-attribute
distal-attribute
distal-attribute

Table names in Foreign key exports are lowercase

galfar posted 4 years ago in Import/Export
Hi,

it looks like when exporting foreign keys Heidi (r3628) always
writes referenced table names in lowercase instead of retaining
the original case.

Example:
CONSTRAINT `FK_OrderItems_ShopProducts` FOREIGN KEY (`IdProduct`) REFERENCES `shopproducts` (`Id`) ON DELETE SET NULL ON UPDATE CASCADE
should be ... REFERENCES `ShopProducts` ...

This behaviour causes problems after I import Heidi's export to MySQL running on Linux server where table names are case-sensitive (constraint failed, table doesn't exist and errors like that).

Could this be fixed?

EDIT: It's not just exports, in GUI FK editor referenced table name always reverts to lowercase too.
ansgar posted 4 years ago
HeidiSQL does not LowerCase() anything in foreign keys. Are you sure ShopProducts is not shopproducts? As you're talking about exporting to a Linux server I guess your source server is Windows, on which MySQL by default has lower_case_table_names set to 1. Find out on your server:

SHOW VARIABLES LIKE 'lower_case_%'

galfar posted 4 years ago
Sorry, the bug seems to be in InnoDB, see http://bugs.mysql.com/bug.php?id=55222

Please login to leave a reply, or register at first.