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

Table names in Foreign key exports are lowercase

User, date Message
Written by galfar
4 years ago
Category: Import/Export
2 posts since Mon, 20 Dec 10
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.
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
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_%'

Written by galfar
4 years ago
2 posts since Mon, 20 Dec 10
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.