Skip to content

Commit bd4bcb1

Browse files
arsa-devachrinza
authored andcommitted
fix(migration): add dbDefault also when altering table
Signed-off-by: Antonio Ramón Sánchez Morales <[email protected]>
1 parent 61b415c commit bd4bcb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/migration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function mixinMigration(PostgreSQL) {
159159
model, self.column(model, propName), actualFields,
160160
);
161161
if (!found && self.propertyHasNotBeenDeleted(model, propName)) {
162-
sql.push('ADD COLUMN ' + self.addPropertyToActual(model, propName));
162+
sql.push('ADD COLUMN ' + self.addPropertyToActual(model, propName) + self.columnDbDefault(model, propName));
163163
}
164164
});
165165
if (sql.length > 0) {

0 commit comments

Comments
 (0)