The Fauna service will be ending on May 30, 2025.

For more information on the service wind down, see our announcement and the Fauna Service End-of-Life FAQ.

Rename a child database

Reading or writing database documents requires an admin key.

Problem

You need to change the name of a child database.

Solution

Use the Update function:

Copied!
Update(Database('annuvin'), { name: 'llyr' })
{
  ref: Database("llyr"),
  ts: 1624310577150000,
  name: 'llyr',
  global_id: 'yoat8nnggybyy'
}
Query metrics:
  •    bytesIn:   69

  •   bytesOut:  148

  • computeOps:    1

  •    readOps:    0

  •   writeOps:    1

  •  readBytes:  170

  • writeBytes:  477

  •  queryTime: 28ms

  •    retries:    0

Discussion

It is not possible to rename the parent database, the current database, or any of the current database’s peers (that may exist) using Update. You can only rename a child databases.

\