New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Lowercase Table Names in Dot Export w/ Patch #920

sequelpro opened this Issue Nov 9, 2013 · 1 comment


None yet
1 participant

ghost commented Nov 9, 2013

Issue imported from Google Code: Date:2010-12-03 21:39:04 Status:Fixed Closed:2010-12-01

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' ( 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...


This comment has been minimized.


ghost commented Nov 9, 2013 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 :)

@sequelpro sequelpro closed this Nov 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment