no-migration-comment-cruft
Commented-out SQL, decorative banners, untracked debt markers, and long implementation narration 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; delete long implementation narration. Retain concise operational constraints, rollback instructions, and tool directives.
Examples
-- DROP TABLE legacy_events;SELECT 1;-- Roll back by restoring snapshot OPS-812.SELECT 1;Autofix output
SELECT 1;-- Create the custom_integration table used by the application.-- The table stores each configured integration for an organization.-- The next statement defines its identifier and display name.-- The final statement creates those columns in the database.CREATE TABLE IF NOT EXISTS integration (id BIGINT PRIMARY KEY, name TEXT);-- Backfill no more than 1000 rows per transaction.-- Keep lock_timeout at 3 seconds while API-812 writes continuously.-- Wait for replica lag to return below 500 ms before the next batch.-- Roll back by dropping the new index concurrently.SET lock_timeout = '3s';
SELECT 1;-- CREATE TABLE access (id BIGINT PRIMARY KEY, permission TEXT);-- CREATE TABLE users (id BIGINT PRIMARY KEY, name TEXT);-- CREATE TABLE groups (id BIGINT PRIMARY KEY, name TEXT);-- CREATE TABLE teams (id BIGINT PRIMARY KEY, name TEXT);-- CREATE TABLE accounts (id BIGINT PRIMARY KEY, name TEXT);CREATE TABLE access (id BIGINT PRIMARY KEY, permission TEXT);
CREATE TABLE users (id BIGINT PRIMARY KEY, name TEXT);
CREATE TABLE groups (id BIGINT PRIMARY KEY, name TEXT);
CREATE TABLE teams (id BIGINT PRIMARY KEY, name TEXT);
CREATE TABLE accounts (id BIGINT PRIMARY KEY, name TEXT);Formerly: excessive-commentary, no-comment-cruft, no-long-migration-narration