pagehive

move_table

Move a table between the account and a site, or from one site to another, keeping its rows, ids and history.

TablesChanges dataAll plans

What it does

Move a table between the account and a site, or from one site to another, keeping its rows, ids and history. Full account keys only. to_site_id is a site id from list_sites, or null for the account. Every site reads account data in a page render, but only the owner and sites with a share read site data, and a site key never reads account data. The move is refused, and nothing changes, when the table has read_access members_own or site, or owner_browser true, and goes to the account, when rows belong to members of the old site, when visitor actions of the old site use it, or when pages on other sites read it and keep_access is not true. keep_access true gives the old owner a read_write share and those other sites a read share. A share to the new owner is removed. dry_run true returns the plan (blockers, shares, warnings) without moving.

Plans

Works on every plan: Free, Basic, Pro and Ultra.

Parameters

NameTypeAbout
namerequiredstringThe table to move to another site.
to_site_idrequiredstring or nullA site id from list_sites, or null for the account.
keep_accessbooleanGive the old owner a read_write share and sites whose pages read it a read share. Default false.
dry_runbooleanReturn the plan without moving. Default false.

Example

Call move_table with these arguments:

{
  "name": "recipes",
  "to_site_id": "01a1…",
  "dry_run": true
}

Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.

Related guides