Skip to content
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

v1.8.0 MariaDB/MySQL fix casing scripts seem to break with MySQL #569

Open
vilma-heikkila opened this issue Jul 29, 2024 · 2 comments
Open

Comments

@vilma-heikkila
Copy link

vilma-heikkila commented Jul 29, 2024

Describe the bug
With 1.8.0 came a bug fix for schemas/tables with different casings (#557). However, the scripts use "ALTER TABLE IF EXISTS" syntax which doesn't seem to exist in MySQL, only in MariaDB. This breaks the database migration. The documentation says that grate supports MariaDB/MySQL, but in this specific case it doesn't. :)

To Reproduce

Have a MySQL server
Run grate -cs "XXX" --dbt "mariadb" --files "XXX"

Error occurs:

An error occurred: Migration failed due to the following errors:

Update ("up"):
--------------------------------------------------------------------------------
grate-internal\00_02_fix_version_table_casing.sql: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `grate_grateversion`
RENAME TO `grate_GrateVersion`' at line 1

Expected behavior
The script should not break the database migration.

Desktop (please complete the following information):

  • OS: Windows 11 Enterprise
  • Version: 23H2
@twerthi
Copy link

twerthi commented Sep 10, 2024

I'm running into this as well on MySQL instances.

@misterjunio
Copy link

misterjunio commented Oct 17, 2024

+1. Are there any known workarounds? This basically makes the latest Grate version 1.8.0 (and future ones if not fixed) unusable for MySQL :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants