flynt-cli
flynt-cli copied to clipboard
Command `flynt setup createDb` fails if database user already exists.
When running flynt setup for an existing project, if the database user already exists then the final flynt setup createDb task fails because it can't create the user (because it already exists).
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'localhost'@'localhost'
Is it possible to add a check to the relevant query that checks IF NOT EXISTS before attempting to create the database user (similar to the line above)?
I already tried manually changing the command to CREATE USER IF NOT EXISTS '${answers.dbUser}'@'${answers.dbHost}' IDENTIFIED BY '${answers.dbPassword}'; but that is invalid syntax.