delete-database
Delete a child database from the current database.
Description
The delete-database
command deletes a child database. If you don’t
pass any options at the command line, Fauna uses the default options
in the fauna-shell
configuration file.
This command deletes the database and all of its contents. |
It is not possible to use this command to delete a parent or peer database. To delete a database outside of the current database, use the Fauna Dashboard.
Options
Option | Description |
---|---|
|
Optional Fauna server domain, that is, the hostname where
Fauna is running. Defaults to |
|
Optional name of the endpoint to use for the command. |
|
Optional connection port. Defaults to 8443. |
|
Optional connection scheme. Must be one of |
|
Optional secret to use. A secret authenticates your connection to Fauna, and connects you to a database. |
|
Optional connection timeout, an integer number of milliseconds.
When the interval has elapsed, The default is zero, which means that |
|
Not supported. |
|
Not supported. |
Examples
Assume that the current database has only one child database,
my-test-db
. To delete it, run:
$ fauna delete-database my-test-db
deleting database 'my-test-db'
database 'my-test-db' deleted
To verify that the database is deleted, run fauna shell
and query the
list of child databases and note that there are now none:
Connected to https://db.fauna.com:443
Type Ctrl+D or .exit to exit the shell
> Database.all()
{
data: [
{
name: "production",
coll: Database,
ts: Time("2023-08-21T23:28:56.840Z"),
global_id: "ywz5gew1syrre"
},
{
name: "internal",
coll: Database,
ts: Time("2023-08-21T23:28:56.840Z"),
global_id: "ywz5gew1syyre"
}
]
}
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!