Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Should DB tables be mixed case or all lowercase

edited December 2005 in Vanilla 1.0 Help
I have installed vanilla 0.9.2.6 on two different machines. On one, the DB tables went in as all lowercase (e.g. lum_role). But on the other machine, the table names are consistent with the convention in database.sql (LUM_Role). During development, I would like to export (dump) individual tables from one to the other from time to time, but I can't because the tables are named differently. Which way are they supposed to be? Does it matter? If so, is there a way (beside manually renaming one set) to make sure they install one way or another? Thanks

Comments

  • Options
    MarkMark Vanilla Staff
    Let me guess, the lowercase one is on a windows machine? I have the same problem, and I've googled for days trying to figure out how to make mysql keep the text-case intact on windows, but I've never been able to accomplish. Now it has become a point of contention for me - where I refuse to bend to the flaw on windows that causes this to happen. I want to have my mixed case naming conventions. If anyone comes up with a solution, please tell me about it.
  • Options
    lechlech Chicagoland
    hmm, the easiest solution would be to just name the tables to all lowercase (don't hit me!). However, this could be some bug in mySQL on windows for all we know, perhaps a switch or something isn't properly set somewhere for all we know. I'll google around for a solution.
  • Options
    lechlech Chicagoland
    edited December 2005
    mark : http://dev.mysql.com/doc/refman/4.1/en/name-case-sensitivity.html mainly to do with windows and the mysql.ini having a flag set for "lower_case_table_names", this is your enemy.
  • Options
    @ original post just export from one into an SQL file and then find/replace to sort out the table names. SIMPLE!
  • Options
    lechlech Chicagoland
    that's so wrong...
  • Options
    MarkMark Vanilla Staff
    I set the lower_case_table_names to 2 on my windows machine and expected everything to break, but so far nothing has. I'll have to tinker with it more when I'm properly awake.
  • Options
    So is this a flaw of the OS or MySQL Winnie build?
  • Options
    @mark, @lech thanks for the info, I'm playing around with lower_case_table_names as well. @navitron Your suggestion is what I'm trying to avoid. (it's currently what I'm doing) @Kosmo Good question. I'm wondering that as well. FWIW (and that probably isn't much), I also prefer the mixed casing.
  • Options
    lechlech Chicagoland
    Kosmo, it's a bit of both, as on windows, AA = aa, while on most *nix and other variants, AA != aa and so on. So, I suspect someone over at mySQL didn't think it would affect anyone so they left it at a default state and left it up to the system it's running upon to decide which to use. Hopefully in current-coming and later builds they'll clean this up somehow, because it's an obvious annoyance.
  • Options
    lechlech Chicagoland
    mark, once you're set, run mySQL and php through some kind of benchmark and see if there's any warning lights that pop up. The one thing that suprises me is how it will lower case the table names but not everything else.
This discussion has been closed.