---
title: "The State of Online Schema Migrations in MySQL — PlanetScale"
description: "MySQL's native INPLACE online DDL is unsuitable for non-blocking changes because it is resource-greedy, uninterruptible and blocks replicas, causing replication lag as long as the original ALTER."
url: "https://swe.quest/articles/the-state-of-online-schema-migrations-in-mysql-planetscale-1e08889c563423ee"
canonical: "https://planetscale.com/blog/state-of-online-schema-migrations-in-mysql"
source: "PlanetScale"
published: "2024-07-23"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 9
tags: ["schema-migrations","mysql"]
---

# The State of Online Schema Migrations in MySQL — PlanetScale

A post on [PlanetScale](https://swe.quest/sources/planetscale.md), published 2024-07-23, 9 min read, Deep dive. Original: [https://planetscale.com/blog/state-of-online-schema-migrations-in-mysql](https://planetscale.com/blog/state-of-online-schema-migrations-in-mysql)

## Summary

MySQL's native INPLACE online DDL is unsuitable for non-blocking changes because it is resource-greedy, uninterruptible and blocks replicas, causing replication lag as long as the original ALTER. INSTANT DDL is ideal where supported, but it covers mostly metadata changes plus ADD/DROP COLUMN, and an instant DROP COLUMN destroys data and metadata with no built-in way back. For most ALTER TABLE changes, shadow-table tools such as Vitess, gh-ost, pt-online-schema-change and spirit remain the recommended approach: they throttle against lag, are interruptible and support almost every change type. Vitess and spirit also auto-detect INSTANT-eligible changes, and Vitess adds revertibility that preserves data.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Schema migrations](https://swe.quest/tags/schema-migrations.md) (Data & databases)
- [MySQL](https://swe.quest/tags/mysql.md) (Data & databases)

## Prerequisites

- MySQL replication ([easy posts on MySQL](https://swe.quest/tags/mysql.md?difficulty=easy))
- ALTER TABLE DDL
- InnoDB basics

## Keywords

MySQL, InnoDB, Vitess, gh-ost, pt-online-schema-change, spirit, INSTANT DDL, PlanetScale

## Related posts

- [Migrating Data Ingestion Systems at Meta Scale](https://swe.quest/articles/migrating-data-ingestion-systems-at-meta-scale-338df596ae05796f.md): Meta Engineering · 2026-05-12 · Medium · 9 min read · Data pipelines, Event-driven architecture, MySQL, Refactoring & migrations, Deployment
  Meta migrated tens of thousands of MySQL-to-warehouse change data capture (CDC) ingestion jobs, together moving several petabytes daily, from customer-owned pipelines to a self-managed warehouse service, and fully retired the legacy system.
- [Faster schema changes for large SQLite databases](https://swe.quest/articles/faster-schema-changes-for-large-sqlite-databases-4f28e48522ae95e1.md): Turso · 2025-09-02 · Medium · 3 min read · SQLite, Schema migrations, Performance engineering, Rust, Storage engines
  SQLite re-parses the entire sqlite\_schema table after every ALTER TABLE, so schema changes cost time proportional to total schema size even when only one table is touched.
- [Migrating Etsy’s database sharding to Vitess](https://swe.quest/articles/migrating-etsy-s-database-sharding-to-vitess-c6bef1d09f2cd679.md): Etsy Code as Craft · 2026-03-19 · Medium · 9 min read · MySQL, Distributed databases, Refactoring & migrations, SQLite, Deployment
  Etsy moved shard routing for its ~1,000-table, ~1,000-shard, 425 TB MySQL cluster (1.7M requests/sec) from an ORM that looked up random shard mappings in a single index database to Vitess vindexes, without moving any data.
- [How to Deploy Schema Changes to a Million Databases](https://swe.quest/articles/how-to-deploy-schema-changes-to-a-million-databases-356cdf3f01c11d17.md): Turso · 2025-06-02 · Medium · 4 min read · Schema migrations, Multi-tenancy, SQLite, Local-first & sync, Go
  Database-per-tenant schema migrations can scale to millions of databases by inverting control: a hosted schema registry stores a versioned catalog of SQL scripts, and each client periodically reports its schema version, pulls the missing migrations and applies them locally.
- [Safely Adding NOT NULL Columns to Your Database Tables](https://swe.quest/articles/safely-adding-not-null-columns-to-your-database-tables-0c4b04a1141f0507.md): Shopify Engineering · 2022-10-04 · Medium · 7 min read · Schema migrations, MySQL, Databases
  Adding a NOT NULL column through LHM's shadow-table migration (new table, replication triggers, batched copy, rename) can break writes or silently lose data depending on the DEFAULT clause, an added UNIQUE INDEX and the MySQL SQL mode.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
