From 0aeb55dcfd6c107c67e4c974e3371e29e188310b Mon Sep 17 00:00:00 2001 From: Jonathan Bennetts Date: Wed, 21 Sep 2022 20:58:43 +0100 Subject: [PATCH] fix: mysql migration using incorrect syntax on insert (#4166) fix: mysql migration using incorrect on insert --- .../mysqldb/1660062385367-CreateCredentialsUserRole.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/databases/migrations/mysqldb/1660062385367-CreateCredentialsUserRole.ts b/packages/cli/src/databases/migrations/mysqldb/1660062385367-CreateCredentialsUserRole.ts index 0d19e0c2488b6..1478e6df6d5ba 100644 --- a/packages/cli/src/databases/migrations/mysqldb/1660062385367-CreateCredentialsUserRole.ts +++ b/packages/cli/src/databases/migrations/mysqldb/1660062385367-CreateCredentialsUserRole.ts @@ -8,9 +8,8 @@ export class CreateCredentialsUserRole1660062385367 implements MigrationInterfac const tablePrefix = config.getEnv('database.tablePrefix'); await queryRunner.query(` - INSERT INTO ${tablePrefix}role (name, scope) - VALUES ("user", "credential") - ON CONFLICT DO NOTHING; + INSERT IGNORE INTO ${tablePrefix}role (name, scope) + VALUES ("user", "credential"); `); }