Add option to declare an array

This commit is contained in:
1ilit
2024-07-05 22:28:44 +03:00
parent 9b606114df
commit c005020048
6 changed files with 45 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ export function toPostgres(diagram) {
(field) =>
`${field.comment === "" ? "" : `\t-- ${field.comment}\n`}\t"${
field.name
}" ${field.type}${field.notNull ? " NOT NULL" : ""}${field.unique ? " UNIQUE" : ""}${
}" ${field.type}${field.isArray ? " ARRAY" : ""}${field.notNull ? " NOT NULL" : ""}${field.unique ? " UNIQUE" : ""}${
field.default.trim() !== ""
? ` DEFAULT ${parseDefault(field, diagram.database)}`
: ""