Behind the scenes: How schema reverts work
Mar 24, 2022Holly Guevara, Shlomi Noach

Summary
This post details the technical implementation of PlanetScale's schema revert feature, which leverages Vitess's VReplication to enable instant, zero-data-loss reverts of schema changes. It explains how VReplication's transactional tracking of backfill and ongoing changes, coupled with GTID precision, allows for a seamless swap back to a previous schema state. The post highlights that the shadow table created during the initial schema change is retained and continuously synced, facilitating a quick revert process without re-copying data.