I got this error while migrating when I tried to use mysql as database
(Error 1060: Duplicate column name ‘subject’)
This is my docker-compose
version: ‘2’
services:
hydra-migrate:
build:
context: .
dockerfile: Dockerfile
links:
- mysqld:mysqld
environment:
- DATABASE_URL=mysql://root:secret@tcp(mysqld:3306)/hydra?parseTime=true
command:
migrate sql -e
restart: on-failure
.
.
.
mysqld:
container_name: ory-hydra-example–mysql
restart: always
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: ‘secret’ # TODO: Change this
MYSQL_DATABASE: hydra
volumes:
- ./my-datavolume:/var/lib/mysql
volumes:
my-datavolume: