Database Migrations
Change schemas safely: expand-contract, concurrent indexes, backfills, and tested rollbacks.
Learning path
Change schemas safely: expand-contract, concurrent indexes, backfills, and tested rollbacks.
Compare "Dropping Is a Two-Step Verification" with "Versioning the Migrations and the Code Together" in "Database Migration Strategies That Won't Break Production" and state which trade-off you would accept in database migrations code.
Next step: Create a Database Index Without Downtime
⏱ 1h
Carry out "Create a Database Index Without Downtime" on a database migrations project, pausing at the "The baseline shows a specific bottleneck the index should improve." step to verify "Measure the query and baseline: Capture the query plan, latency, and rows scanned for the".
Next step: Backfill a Large Table Safely
⏱ 1h
Use "Backfill a Large Table Safely" to decide "Re-running a batch does not double-apply changes.", then prove the outcome with "Estimate the work: Count affected rows, measure a small batch, and estimate total duration".
Prerequisites: Create a Database Index Without Downtime
Next step: Apply a Zero-Downtime PostgreSQL Column Migration
⏱ 1h
Run "Migrate a PostgreSQL column through expand and contract phases so old and new application" from "Apply a Zero-Downtime PostgreSQL Column Migration" and confirm the documented result "psql reports ALTER TABLE, CREATE FUNCTION, CREATE TRIGGER, and COMMIT; the new column is".
Prerequisites: Backfill a Large Table Safely
Next step: How to Test Database Migrations
⏱ 1h
Compare "What Migration Tests Must Cover" with "Test Against the Real Database Engine" in "How to Test Database Migrations" and state which trade-off you would accept in database migrations code.
Prerequisites: Apply a Zero-Downtime PostgreSQL Column Migration
Next step: How to Query JSONB in PostgreSQL
⏱ 1h
Reconstruct the reasoning behind "How to Query JSONB in PostgreSQL" by tracing "Learn the operators" to the failure it prevents in database migrations systems.
Next step: Order Migrations and Detect Cycles
⏱ 1h
Solve "Order Migrations and Detect Cycles" for database migrations work: turn JSON object: { migrations: [{ id, dependsOn?: string[] }] } into {order:[001_init,002_add_table,003_add_index],cyclic:false,cycle:[]} and pass both samples.
Prerequisites: How to Query JSONB in PostgreSQL
Next step: Capstone: Database Migrations
⏱ 0.42h
Ship "Drift detection" from "Build a Database Migration Runner", then prove it with the project's test suite and an acceptance note.
Prerequisites: How to Query JSONB in PostgreSQL, Order Migrations and Detect Cycles
Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.
⏱ 4h