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 = {
857
857
return field . default . length <= field . size ;
858
858
} ,
859
859
hasCheck : true ,
860
- isSized : true ,
860
+ isSized : false ,
861
861
hasPrecision : false ,
862
- defaultSize : 65535 ,
863
862
hasQuotes : true ,
864
863
} ,
865
864
BYTEA : {
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ export function toPostgres(diagram) {
31
31
( field ) =>
32
32
`${ exportFieldComment ( field . comment ) } \t"${
33
33
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" : "" } ${
35
37
field . increment ? " GENERATED BY DEFAULT AS IDENTITY" : ""
36
38
} ${
37
39
field . default . trim ( ) !== ""
You can’t perform that action at this time.
0 commit comments