grate-devs / grate-devs/grate

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

Open
#215 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
297
Forks
55
Avg merge
18m
Merged PRs (30d)
1

Description

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.