question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MySql table name capitalization cause problems on linux

See original GitHub issue

I have a problem where after sequelize.sync({ force: true }) created tables has original Capitalized case, but when I am trying to store record via record.save() it runs query which uses all lowercase table name.

At the very least, on linux with default configuration this causes problem, since table Clients != clients. I can manually create tables, but sounds like there should be a better way. Any ideas?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
janmeiercommented, Apr 8, 2015

Cannot reproduce on latest master. It uses the same table name both on sync and save in my case.

Which version are you on?

Perhaps you can provide a PR with a failing test case?

1reaction
hippichcommented, Apr 8, 2015

Small update/workaround - if I use:

freezeTableName: true, tableName: ‘clients’

This forces same table names during synchronization and in normal usage.

While workaround is fine in my case, this sounds like a bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MySQL case sensitive table names on Linux
Because lower_case_table_names is set, each database and table name will be converted to lowercase as it is recreated: mysql < db1.sql.
Read more >
MySql Case Sensitive Table Names Issue on Windows/Linux
lower_case_table_names=1 > table names are stored in lowercase on disk and comparisons are not case sensitive. lower_case_table_names=2 > table ...
Read more >
Are table names in MySQL case sensitive? - Stack Overflow
1 - Table names are stored in lowercase on disk and name comparisons are not case sensitive. 2 - lettercase specified in the...
Read more >
MySQL 8.0 Reference Manual :: 9.2.3 Identifier Case Sensitivity
Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement. Name comparisons are...
Read more >
Uppercase letters in table name prefix - Warnings - Akeeba Ltd
Again, this is documented by MySQL itself! If your server is running on Linux OR a case-sensitive filesystem (e.g. HFS+ Case-Sensitive on macOS)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found