From d96de4874ac8648b250e9969738814385eb982e3 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Mon, 25 Jan 2021 17:45:11 +0100 Subject: [PATCH] Add IF EXISTS to DropNameFromUsers migration to not fail in new installs --- src/auth/migrations/DropNameFromUsers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/migrations/DropNameFromUsers.ts b/src/auth/migrations/DropNameFromUsers.ts index 1c7352a..bc3e0c5 100644 --- a/src/auth/migrations/DropNameFromUsers.ts +++ b/src/auth/migrations/DropNameFromUsers.ts @@ -5,7 +5,7 @@ import Migration from "../../db/Migration"; */ export default class DropNameFromUsers extends Migration { public async install(): Promise { - await this.query('ALTER TABLE users DROP COLUMN name'); + await this.query('ALTER TABLE users DROP COLUMN IF EXISTS name'); } public async rollback(): Promise {