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

Hi @clems4ever ,

Great you released Authelia v4! :)

However, I faced a some troubles – will open different issues.

When trying to migrate from a v3 Mongo DB to v4 MySQL DB, it looked like the following syntax is not valid in MySQL: CREATE INDEX IF NOT EXISTS .

I switched to PostgreSQL :)
But that was the standard MySQL 5.7, not MariaDB: MySQL does not seem to suppot this functionality ( https://dev.mysql.com/doc/refman/5.7/en/create-index.html ), while MariaDB does ( https://mariadb.com/kb/en/library/create-index/ ).
Maybe this is helpful for supporting MySQL as well: https://stackoverflow.max-everyday.com/2017/07/mysql-create-index-if-not-exists/

SELECT COUNT(1) Exists FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema=DATABASE() AND table_name='table' AND index_name='name';

Should work for mysql and mariadb, but pretty sure it will not for PostgreSQL and may not for sqlite.