Database.create()
Learn: Databases and multi-tenancy |
---|
Create a child database.
Signature
Database.create(data: { name: String, priority: Number | Null, typechecked: Boolean | Null, protected: Boolean | Null, data: { *: Any } | Null }) => DatabaseDef
Description
Creates a child database with the provided metadata and settings. The parent database is the database to which the query’s the authentication secret is scoped.
Using Database.create()
to create a top-level database is not supported.
Fauna stores child databases as documents in the parent database’s
Database
system collection.
Database
documents have the DatabaseDef type.
Database backups
You can’t use this method to enable backups on a child database. You can only enable backups in the Fauna Dashboard. See Database backup and restore .
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
true |
Document fields containing metadata and settings for the new
For supported document fields, see
|
Return value
Type | Description |
---|---|
The new |