Glossary term
What is expand and contract? Meaning for developers
In Scenario Debugging
Change a database schema safely in steps that old and new code can both survive: add, write to both, backfill, switch reads, then remove the old.
Learn it properly · Scenario DebuggingLesson 14: Architecture, Data and Team Judgement ScenariosMonolith or microservices, rewrite or refactor, migrations with no downtime, safe backfills, multi-tenancy, tech debt, unrealistic deadlines, code-review disagreements and build vs buy.In SQL & PostgreSQL
A safe migration style: add the new thing, move readers and writers, then remove the old thing.
Learn it properly · SQL & PostgreSQLLesson 7: PostgreSQL Features: JSONB, Full-Text Search, Arrays and Safe MigrationsJSONB with GIN indexes, full-text search, arrays, upserts, and expand-and-contract migrations that do not lock a busy table.In API Design
Change an API safely in three steps: add the new thing, move clients over, then remove the old thing.
Learn it properly · API DesignLesson 4: Versioning, Compatibility and Evolving an APIBreaking versus safe changes, URL, header and date versions, deprecation, and how to change an API without breaking clients.