-- looks routine in review, locks your table in production:
CREATE INDEX idx_orders_customer ON orders (customer_id);
ALTER TABLE users ALTER COLUMN email SET NOT NULL;
Enter fullscreen mode
Exit fullscreen mode
-- looks routine in review, locks your table in production: CREATE INDEX idx_orders_customer ON...
-- looks routine in review, locks your table in production:
CREATE INDEX idx_orders_customer ON orders (customer_id);
ALTER TABLE users ALTER COLUMN email SET NOT NULL;
Enter fullscreen mode
Exit fullscreen mode

-- looks fine in review, locks your busiest table in prod: ALTER TABLE users ALTER COLUMN email SET...

A migration can look tiny in a pull request and still be the riskiest line of a release. A column...

I got tired of migration linters that just grep for scary keywords. CREATE INDEX without...

Most table renames are database-easy and deploy-hard. The SQL looked trivial: ALTER TABLE...

Claude Code에 과도한 권한을 줬다가 production D1 데이터를 날릴 뻔한 실제 사고 경위, 디버깅 과정, 그리고 least-privilege 세팅으로 안착하기까지의 운영 노트.

Earlier, I wrote about a 2 a.m. incident. Production is slow, you open psql, the cursor blinks, and...