SYSTEM Cited by 2 sources
MoveTables¶
What it is¶
MoveTables (vitess.io docs) is Vitess's user-facing workflow wrapper for a common data-motion shape: copy tables from one place to another and keep them in sync until cutover. It composes VReplication for the data motion, VDiff for pre-cutover verification, and routing-rule updates for the cutover itself.
MoveTables is the primitive underlying PlanetScale's
Database Imports feature — external-MySQL-to-PlanetScale
migrations are MoveTables workflows.
(Source: sources/2026-02-16-planetscale-zero-downtime-migrations-at-petabyte-scale.)
Key operations¶
MoveTables Create— start the workflow. Provisions per-target-shard VReplication streams that enter the row-copy phase, then transition to continuous binlog replication once the copy is done.MoveTables SwitchTraffic— perform the cutover. Pre-checks tablet health + replication lag + workflow state; locks source and target keyspaces in the topology server plus a named lock on the workflow; stops writes on source; buffers incoming queries (concepts/query-buffering-cutover); waits for replication to fully catch up; creates a reverse VReplication workflow (target → source) so rollback is possible (concepts/reverse-replication-workflow); initialises Vitess Sequences if tables are being sharded; allows writes on target; updates schema routing rules to send queries to target; starts reverse workflow; freezes original workflow; releases locks. "Typically take less than 1 second." See patterns/routing-rule-swap-cutover.MoveTables ReverseTraffic— flip back to the source keyspace using the reverse workflow created atSwitchTraffic. Can be called as many times as needed until the customer is confident in the new system. See patterns/reverse-replication-for-rollback.MoveTables Complete— finalise the migration after the customer is confident. Tears down the reverse workflow and migration-related routing-rule artefacts. Once this is called, the source system can be decommissioned.
Why it shows up on this wiki¶
MoveTables is the canonical wiki instance of a workflow
primitive that composes data motion + verification + cutover
+ rollback into a single addressable unit. It is what
turns VReplication (a low-level per-stream replication
primitive) into a usable product surface. PlanetScale's
Database Imports is literally a thin GUI over
MoveTables + MoveTables SwitchTraffic +
MoveTables Complete. At the mechanical level:
- Migration =
MoveTables Create - Long-running verification = repeated
VDiff/ resume - Test-your-app-against-the-new-system = application redirects to PlanetScale, traffic proxied back via routing rules until cutover
- Cutover =
MoveTables SwitchTraffic - Stay reverse-ready = keep the reverse workflow running
- Rollback =
MoveTables ReverseTraffic(as many times as needed) - Final commit =
MoveTables Complete
The reverse workflow + routing-rule swap together are what make cutover reversible without data loss — a property critical when the new system differs from the old on axes (MySQL version, unsharded → sharded, charset / collation, query-optimiser behaviour) that only manifest under production traffic.
Seen in¶
-
sources/2026-04-21-planetscale-bring-your-data-to-planetscale — earliest canonical wiki disclosure that PlanetScale Database Imports is built on the MoveTables / VReplication stack (Phani Raju, 2021). Names Vitess unmanaged tablet as the composition primitive under the import workflow and canonicalises the database-as-data-router cutover variant — an earlier product-UX shape where the destination transparently proxies writes back to the source during a bidirectional validation phase, with cutover driven by an operator ("Enable primary mode" button) rather than
SwitchTraffic. The 2026-02-16 Matt Lord post describes the atomic-swap design; this 2021 post documents the earlier direction-reversal design. Both share the same underlying mechanics (VReplication + routing rules + reverse replication + unmanaged tablet) and the same reversibility guarantee. -
sources/2026-02-16-planetscale-zero-downtime-migrations-at-petabyte-scale — canonical wiki description of MoveTables'
SwitchTrafficsequence (pre-checks → keyspace locking → write stop + query buffer → replication catch-up → reverse workflow creation → sequence init → allow target writes → routing-rule swap → start reverse workflow → freeze original → release locks), and theReverseTraffic+Completelifecycle. Framed as the user-facing wrapper over VReplication + VDiff that PlanetScale's Database Imports feature is built on.
Related¶
- systems/vitess
- systems/vitess-vreplication
- systems/vitess-vdiff
- systems/vitess-unmanaged-tablet
- systems/mysql
- systems/planetscale
- concepts/online-database-import
- concepts/query-buffering-cutover
- concepts/reverse-replication-workflow
- concepts/schema-routing-rules
- patterns/routing-rule-swap-cutover
- patterns/reverse-replication-for-rollback
- patterns/database-as-data-router
- companies/planetscale