Skip to content

no-migration-comment-cruft

Commented-out SQL, decorative banners, and untracked debt markers must be removed.

Why

Disabled statements drift while version control preserves their history, decorative dividers obscure migration structure, and debt without a durable owner silently persists.

Fix

Execute or delete disabled SQL, delete decorative dividers, and resolve debt or attach a durable issue reference. Retain concise operational constraints, rollback instructions, and tool directives.

Examples

Before — flagged Disabled SQL statement
migrations/001.sql
-- DROP TABLE legacy_events;
SELECT
1;
After — preferred Owned rollback instruction records an operational constraint
migrations/001.sql
-- Roll back by restoring snapshot OPS-812.
SELECT
1;

Formerly: no-comment-cruft