[fix] output:database:postgresql

This commit is contained in:
Christian Fraß 2024-06-03 09:33:24 +02:00
parent ea9d8db0f8
commit 5e928f8cab

View file

@ -89,8 +89,8 @@ namespace _sindri.outputs.database.postgresql
// nullability // nullability
.concat( .concat(
data_field.nullable data_field.nullable
? ["NULL"] ? []
: [] : ["NOT NULL"]
) )
// default // default
.concat( .concat(
@ -166,26 +166,30 @@ namespace _sindri.outputs.database.postgresql
( (
[] []
.concat( .concat(
(domain.description === null) (! (domain.description === null))
? [] ? [
: [
{ {
"kind": "TABLE", "kind": "TABLE",
"subject": domain.name, "subject": domain.name,
"value": domain.description, "value": domain.description,
} }
] ]
: []
) )
.concat( .concat(
(domain.key_field === null) (
? [] (! (domain.key_field === null))
: [ &&
(! (domain.key_field.description === null))
)
? [
{ {
"kind": "COLUMN", "kind": "COLUMN",
"subject": (domain.name + "." + domain.key_field.name), "subject": (domain.name + "." + domain.key_field.name),
"value": domain.description, "value": domain.key_field.description,
} }
] ]
: []
) )
.concat( .concat(
domain.data_fields domain.data_fields