MoveDatabase
MoveDatabase( from, to )
MoveDatabase( from, to )
MoveDatabase( from, to )
MoveDatabase( from, to )
move_database( 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:
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))
map[global_id:yx18twpc4ydyy name:stamps ref:{stamps 0xc0001566f0 0xc0001566f0 0xc000156750} ts:1603747252180000]
{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: 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'}
{
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!