Error 1060: Duplicate column name 'subject'


#1

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:[email protected](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:


#2

Seems like you’re running against an existing database that is improperly configured. Use a new one.


#3

Ow. that’s it. I just change my volume and it’s working properly now. I have another question. Is hydra support mariaDB?. I tried to use mariaDB earlier and I got error message saying not supported storage engine. I forgot to have a screen shot earlier


#4

As it says in the message, it’s not offcially supported at the moment