Skip to content

Database Schema Parameters

The schema.params is a map of properties that control how data is stored in the database. It may contain the following properties:

PropertyTypeDescription
createdFieldstringName of the "created" timestamp attribute. Defaults to "created".
hiddenbooleanHide templated (value) attributes in Javascript properties. Default true.
isoDatesbooleanSet to true to store dates as Javascript ISO strings vs epoch numerics. Default false.
nullsbooleanStore nulls in database attributes vs remove attributes set to null. Default false.
timestamps`booleanstring`
typeFieldstringName of the "type" attribute. Default "_type".
updatedFieldstringName of the "updated" timestamp attribute. Default "updated".

For example:

js
const MySchema = {
    params: {
        isoDates: true,
        timestamps: true,
    }
}