Built-in Field Types
Field Definition
TypeScript Type
PostgreSQL Type
Nullability: allowNull=true
const schema = new PgSchema(
"topics",
{
...
// TypeScript type will be: string | null.
company_id: { type: ID, allowNull: true },
// TypeScript type will be: string (non-nullable).
slug: { type: String },
},
["slug"]
);Optionality: autoInsert="..."
autoUpdate
Last updated