Check out v4 of the Fauna CLI
v4 of the Fauna CLI is now in beta. The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start. |
Database.create()
Creates a database.
Description
The Database.create()
method creates a child database with the provided
metadata and settings. To create a child database, you must use an
authentication secret scoped to
the parent database.
Using Database.create()
to create a top-level database is not supported.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
Yes |
Object describing the child database. |
data fields
Name | Type | Required | Description |
---|---|---|---|
name |
Yes |
Name of the database to create.
|
|
history_days |
Number of days for document retention for the collection. |
||
priority |
User-defined priority assigned to the child database. |
||
typechecked |
Enable type checking: |
||
data |
Metadata for the database. |
Examples
Database.create({
name: "childDB",
typechecked: true,
priority: 10
})
{
name: "childDB",
coll: Database,
ts: Time("2099-06-24T21:53:40.670Z"),
typechecked: true,
priority: 10,
global_id: "ysjpygonryyr1"
}
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!