Skip to content

Commit

Permalink
fix(migration): add dbDefault also when altering table
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Ramón Sánchez Morales <[email protected]>
  • Loading branch information
arsa-dev authored and achrinza committed Oct 17, 2023
1 parent 61b415c commit bd4bcb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bd4bcb1

Please sign in to comment.