From bd4bcb1902f251ec18382dea1094bb6d58603d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ram=C3=B3n=20S=C3=A1nchez=20Morales?= Date: Tue, 17 Oct 2023 12:38:23 +0200 Subject: [PATCH] fix(migration): add dbDefault also when altering table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Antonio Ramón Sánchez Morales --- lib/migration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/migration.js b/lib/migration.js index 2d9b5135..3ca1e1a9 100644 --- a/lib/migration.js +++ b/lib/migration.js @@ -159,7 +159,7 @@ function mixinMigration(PostgreSQL) { model, self.column(model, propName), actualFields, ); if (!found && self.propertyHasNotBeenDeleted(model, propName)) { - sql.push('ADD COLUMN ' + self.addPropertyToActual(model, propName)); + sql.push('ADD COLUMN ' + self.addPropertyToActual(model, propName) + self.columnDbDefault(model, propName)); } }); if (sql.length > 0) {