BACKEND·중요도 6·2026. 06. 11.·r/programming
Why DROP COLUMN breaks rolling deploys, and a CI linter to catch it
── KO ──────────────────
DROP COLUMN이 롤링 배포를 방해하는 이유와 CI 린터 개발에 대한 이야기.
마이그레이션 작업에서 DROP COLUMN을 사용하면 기존 pod가 여전히 열을 읽는 동안 새로운 pod가 이미 열을 제거하기 때문에 롤링 배포가 안전하지 않다. Django의 django-migration-linter를 참고하여, Drizzle에 맞는 CI 린터를 개발하였다. 이 린터는 새로운 마이그레이션을 기반 브랜치와 비교하여 DROP, RENAMES 및 필수 열 추가 시 문제를 감지하도록 설계되었다.
── EN ──────────────────
Why DROP COLUMN breaks rolling deploys and a CI linter developed to catch it.
Using DROP COLUMN in migrations can lead to unsafe rolling deployments, as old pods still read the column while new pods have dropped it. To address this, a CI linter was developed for Drizzle, based on Django's django-migration-linter. This linter diffs new migrations against the base branch and fails on drops, renames, and required columns added in one step.