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. |
MoveDatabase
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
MoveDatabase( from, to )
move_database( from, to )
MoveDatabase( from, to )
MoveDatabase( from, to )
MoveDatabase( from, to )
MoveDatabase( from, to )
Description
The MoveDatabase
function moves the from
database into the to
database, making from
a child database of to
.
You must use an admin key that has
access to the from
database or MoveDatabase
fails.
Examples
The following example creates the stamps
database and the hobbies
database, and then moves the stamps
database into the hobbies
database:
{
ref: Database("stamps", Database("hobbies")),
ts: 1592113609950000,
name: 'stamps',
global_id: 'yqh1r886wybyy'
}
{'ref': Ref(id=stamps, collection=Ref(id=databases), database=Ref(id=hobbies, collection=Ref(id=databases))), 'ts': 1592874958520000, 'name': 'stamps', 'global_id': 'yq79oce4qybyy'}
map[global_id:yx18twpc4ydyy name:stamps ref:{stamps 0xc0001566f0 0xc0001566f0 0xc000156750} ts:1603747252180000]
ObjectV(ref: RefV(id = "stamps", collection = RefV(id = "databases"), database = RefV(id = "hobbies", collection = RefV(id = "databases"))),ts: LongV(1603756596430000),name: StringV(stamps),global_id: StringV(yx1edqz3rydyy))
{ref: ref(id = "stamps", collection = ref(id = "databases"), database = ref(id = "hobbies", collection = ref(id = "databases"))), ts: 1593466725930000, name: "stamps", global_id: "yq9n3nh8hybyy"}
{
ref: Database("stamps", Database("hobbies")),
ts: 1624450808280000,
name: 'stamps',
global_id: 'yoa31tgqgybyy'
}
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!