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

Migrating MariaDB's existing database with a case insensitive environment and getting the error: Can't create database 'dbname'; database exists. #215

Open
najeraz opened this issue Jul 23, 2022 · 1 comment

Comments

@najeraz
Copy link

najeraz commented Jul 23, 2022

Describe the bug
When migrating an existing database using a name with a different case, grate tries to re-create it when the MariaDB instance and the environment have enabled the case insensitive.

To Reproduce

  • Run a MariaDB instance with the environment variable lower_case_table_names as 1 with:
    docker run --name GrateTestCaseInsensitive -p 49185:3306 -e MYSQL_ROOT_PASSWORD=mypass mariadb:10.5.9 mysqld --lower_case_table_names=1
  • Create a database manually with a name using uppercase letters.
  • Migrate it with the same name using a camel case.

Expected behavior
If the case name is insensitive, it should not try to create the existing database.

Desktop

  • OS: Windows 11 Enterprise
  • Version 21H2
@najeraz
Copy link
Author

najeraz commented Jul 23, 2022

Added a PR #216

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

1 participant