Find INSERT ... VALUES statements that omit the column list

Proprietary

An INSERT ... VALUES with no column list binds each value to a column by position, so adding, dropping, or reordering a column silently shifts values into the wrong columns or breaks the statement; naming the target columns keeps it correct across schema changes. INSERT ... SELECT is left alone, since its projection makes the column correspondence explicit.

org.openrewrite.sql.antipattern.FindInsertWithoutColumns

Optional

markSourceBoolean

Whether to mark each occurrence in source, and apply the fix where the rule remediates. Defaults to true; set to false to leave source untouched and report only to the data table, as an analysis-only pipeline requires.

mod run . --recipe=org.openrewrite.sql.antipattern.FindInsertWithoutColumns

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.