File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -857,9 +857,8 @@ const postgresTypesBase = {
857857 return field . default . length <= field . size ;
858858 } ,
859859 hasCheck : true ,
860- isSized : true ,
860+ isSized : false ,
861861 hasPrecision : false ,
862- defaultSize : 65535 ,
863862 hasQuotes : true ,
864863 } ,
865864 BYTEA : {
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ export function toPostgres(diagram) {
3131 ( field ) =>
3232 `${ exportFieldComment ( field . comment ) } \t"${
3333 field . name
34- } " ${ field . type } ${ field . isArray ? " ARRAY" : "" } ${ field . notNull ? " NOT NULL" : "" } ${ field . unique ? " UNIQUE" : "" } ${
34+ } " ${ field . type } ${
35+ field . size !== undefined && field . size !== "" ? "(" + field . size + ")" : ""
36+ } ${ field . isArray ? " ARRAY" : "" } ${ field . notNull ? " NOT NULL" : "" } ${ field . unique ? " UNIQUE" : "" } ${
3537 field . increment ? " GENERATED BY DEFAULT AS IDENTITY" : ""
3638 } ${
3739 field . default . trim ( ) !== ""
You can’t perform that action at this time.
0 commit comments