Thursday, June 5, 2014

All lowercase table names MySQL

Lowercase table names in MySQL

I started working on a project that I do not spend much time on. Right now I am forced to use  windows. This database I created 9 years ago uses camel case I.G. customerNetworks, So I imported this into my local database and something strange happened, all my tables are lower case I.G. customernetworks. This really bugged me. The table calls could be case insensitive. So I pushed on to meet my deadline, When I went to roll out the code, I found case sensitive bugs in my code. To make a long story short, even if you are a *nix person or not, when you write code/databases you need to think about everyone that is going to use it and use "customer_networks" instead of  "customerNetworks". 

NOTES: If you have to use a database that has camel case here is a article for you http://stackoverflow.com/questions/6248735/how-to-force-case-sensitive-table-names