Mysql docker setup - forcing mysql identifiers (database, table, triggers) naming to lowercase and name comparison to caseinsensitive, so hibernate queries can work even when referencing upper cased table names

This commit is contained in:
Octavian Ianculescu
2021-05-26 21:06:37 +03:00
parent af6208c1f1
commit f52041b8c6
2 changed files with 6 additions and 1 deletions

View File

@@ -196,6 +196,9 @@ spring:
jpa:
hibernate.physical_naming_strategy: NAME_OF_PREFERRED_STRATEGY
```
On linux systems or when using docker mysql containers, it will be necessary to review the case-sensitive setup for
mysql schema identifiers. See https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html. We suggest you
set `lower_case_table_names=1` during mysql startup.
### PostgreSQL configuration

View File

@@ -9,6 +9,8 @@ services:
hapi-fhir-mysql:
image: mysql:latest
container_name: hapi-fhir-mysql
#https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html
command: --lower_case_table_names=1
restart: always
environment:
MYSQL_DATABASE: 'hapi'
@@ -18,4 +20,4 @@ services:
volumes:
- hapi-fhir-mysql:/var/lib/mysql
volumes:
hapi-fhir-mysql:
hapi-fhir-mysql: