Zero-Downtime Database Migrations: How to Change a Live Schema Safely
A practical playbook for changing a live database schema with no downtime: expand and contract, safe locks, batched backfills, and rollbacks.

A practical playbook for changing a live database schema with no downtime: expand and contract, safe locks, batched backfills, and rollbacks.

Learn SQL, indexes, and transactions by doing, with SQLite built into Python, then see how it carries over to Postgres and when NoSQL, Redis, or a vector database makes sense.

How to change a live PostgreSQL schema without freezing tables or breaking running code: the expand and contract pattern, safer versions of risky ALTERs, and tested code.

Dirty reads, lost updates and write skew: what each bug looks like, which isolation level stops it, and what PostgreSQL and MySQL really do.

When Postgres with pgvector is enough, when a dedicated vector database earns its keep, and how to decide using scale, filtering, and operations.

Learn to read EXPLAIN ANALYZE output, spot what actually slows a query down, and fix it with better indexes, statistics, and cleaner SQL.
