From 3b735d28f6fbd61ddc0ea03f98ef0dacd42eadf6 Mon Sep 17 00:00:00 2001 From: mntmn Date: Sun, 19 May 2019 22:37:35 +0200 Subject: [PATCH] fix migration 01 --- models/migrations/01-spaces-delete-cascade.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/models/migrations/01-spaces-delete-cascade.js b/models/migrations/01-spaces-delete-cascade.js index a1c2f46..a21e005 100644 --- a/models/migrations/01-spaces-delete-cascade.js +++ b/models/migrations/01-spaces-delete-cascade.js @@ -2,7 +2,7 @@ module.exports = { up: function(migration, DataTypes) { - return [ + return Promise.all([ migration.changeColumn('memberships', 'space_id', { type: DataTypes.STRING, @@ -36,11 +36,11 @@ module.exports = { onUpdate: 'CASCADE' } ) - ] + ]) }, down: function(migration, DataTypes) { - return [ + return Promise.all([ migration.changeColumn('memberships', 'space_id', { type: DataTypes.STRING, @@ -52,7 +52,6 @@ module.exports = { onUpdate: 'NO ACTION' } ), - , migration.changeColumn('artifacts', 'space_id', { type: DataTypes.STRING, @@ -75,6 +74,6 @@ module.exports = { onUpdate: 'NO ACTION' } ) - ] + ]) } -}; +}