Check out v4 of the Fauna CLI
v4 of the Fauna CLI is now GA. The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start. Migrating from v3 of the CLI? See the CLI migration guide. |
database.update()
Learn: Databases and multi-tenancy |
---|
Update a child database's metadata and settings.
Description
Updates a child database's metadata
and settings, represented as a
Database
document, with fields
from a provided data object.
Fauna stores child databases as documents in the parent database’s
Database
system collection.
Database
documents have the DatabaseDef type.
During the update, fields from the data object are copied to the document, creating new fields or updating existing fields. The operation is similar to a merge.
Nested fields
Fields with nested objects in the data object are merged with the identically named nested object in the document.
Database backups
You can’t use this method to enable or disable backups on a child database. You can only enable or disable backups in the Fauna Dashboard. See Database backup and restore .
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
true |
Document fields for the
For supported document fields, see
The object can’t include the following metadata fields: * |
Return value
Type | Description |
---|---|
The updated |
Examples
Database.byName("childDB")!.update({typechecked: false})
{
name: "childDB",
coll: Database,
ts: Time("2099-06-24T21:58:19.346Z"),
priority: 10,
global_id: "ysjpykbahyyr1",
typechecked: false
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!