Force Lowercase Table Names in Dot Export w/ Patch #920
Issue imported from Google Code: https://code.google.com/p/sequel-pro/issues/detail?id=920
Present an option in the Dot Export's advanced panel to force table names of nodes to be lowercase in the exported file.
As described by rowanb in issue #477 , MySQL servers installed on Windows / Mac OS X commonly have the system variable 'lower_case_table_names' (http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html) set to "1" or "2". This leads to an issue where the constraint references the original table by a different case than the original case.
This leads to an issue in a Dot Export because Dot is case sensitive and the constraint relationships will have different cases as reported by the MySQL server (the client, Sequel Pro, can do nothing about it). When the nodes don't match in case, dot creates new nodes so the resulting graph has none of the subgraphs connected and several new nodes with the lowercase table name.
A patch is included that 1) enables the advanced panel for Dot Export 2) adds a checkbox labelled "Force lowercase table names" (defaults to not checked) and 3) modifies the DotExporter class to act accordingly on only the node names (the labels are not modified) of tables.
The feature definitely provides a little convenience to users who have to deal with the 'lower_case_table_names' behavior so they don't have to hand modify the dot files afterward. The labels are not modified so visually the resulting graph looks exactly as it would if you weren't having to deal with any of the case sensitivity issues.
PS- Apologies in advance for any issues with the diff of the ExportDialog.xib...
The text was updated successfully, but these errors were encountered:
Author:email@example.com Date:2010-12-04 16:42:04
Many thanks for this patch - it's been applied in r2960, in slightly tweaked form. Notably we now check the lower_case_table_names setting and use that to set the initial checkbox value.
Thanks for coming up with this approach and supplying a patch - very much appreciated :)