mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-02-11 02:00:37 +08:00
Add option to declare an array
This commit is contained in:
@@ -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)}`
|
||||
: ""
|
||||
|
||||
Reference in New Issue
Block a user