Add IF EXISTS to DropNameFromUsers migration to not fail in new installs

This commit is contained in:
Alice Gaudon 2021-01-25 17:45:11 +01:00
parent 8b805a484b
commit d96de4874a

View File

@ -5,7 +5,7 @@ import Migration from "../../db/Migration";
*/
export default class DropNameFromUsers extends Migration {
public async install(): Promise<void> {
await this.query('ALTER TABLE users DROP COLUMN name');
await this.query('ALTER TABLE users DROP COLUMN IF EXISTS name');
}
public async rollback(): Promise<void> {