FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. Fauna accounts created after August 21, 2024 must use FQL v10. These accounts will not be able to run FQL v4 queries or access the v4 Dashboard. For more details, see the v4 EOL announcement and migration guide. Contact support@fauna.com with any questions. |
Rename a child database
Reading or writing database documents requires an admin key. |
Solution
Use the Update
function:
{
ref: Database("llyr"),
ts: 1622573509460000,
name: 'llyr',
global_id: 'yoiji573cydyy'
}
{'ref': Ref(id=llyr, collection=Ref(id=databases)), 'ts': 1622573512200000, 'name': 'llyr', 'global_id': 'yoijihdqgydyy'}
map[global_id:yoiji3uwcybyy name:llyr ref:{llyr 0xc0001804b0 0xc0001804b0 <nil>} ts:1622573472680000]
ObjectV(ref: RefV(id = "llyr", collection = RefV(id = "databases")),ts: LongV(1622573459830000),name: StringV(llyr),global_id: StringV(yoijia8e1ybyy))
{ref: ref(id = "llyr", collection = ref(id = "databases")), ts: 1622573496170000, name: "llyr", global_id: "yoiji48irybyy"}
{
ref: Database("llyr"),
ts: 1624310577150000,
name: 'llyr',
global_id: 'yoat8nnggybyy'
}
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.
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!