ゼロダウンタイムマイグレーション - CI/CD用語集の定義
ゼロダウンタイムマイグレーションは、各ステップを後方互換にすることで、アプリケーションをオフラインにせずにスキーマを変更し、deploy中に古いコードと新しいコードの両方がデータベースに対して動作できるようにします。
方法
通常はexpand-contractパターンと、ブロッキング操作を避けることで実現します。null許容のカラムを追加し、バッチで埋め戻し、リネームを「新規追加、二重書き込み、旧削除」に分割して別々のリリースにまたがせます。
関連ガイド
Expand-Contract Migration - CI/CD Glossary DefinitionExpand-Contract Migration: The expand-contract (parallel change) pattern splits a breaking schema change into…
Online Schema Change - CI/CD Glossary DefinitionOnline Schema Change: An online schema change alters a large table without blocking reads and writes, typical…
Backfill - CI/CD Glossary DefinitionBackfill: A backfill populates a newly added column or table with values derived from existing data, typicall…