Skip to content

Commit c515542

Browse files
committed
Don't write field comments for mssql, because it throws error in sequelize.sync() (#567)
1 parent 60d9307 commit c515542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/auto-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ export class AutoGenerator {
398398

399399
str += space[3] + attr + ": " + val_text;
400400

401-
} else if (attr === "comment" && !fieldObj[attr]) {
401+
} else if (attr === "comment" && (!fieldObj[attr] || this.dialect.name === "mssql")) {
402402
return true;
403403
} else {
404404
let val = (attr !== "type") ? null : this.getSqType(fieldObj, attr);

0 commit comments

Comments
 (0)