Skip to main content

CAP.L0.NOT_CAPTURABLE — No capturable SQL

  • Category: safety
  • Level: 0
  • Stability: stable
  • Suites: lint

The capture ran to completion but produced no SQL to lint. Before any rule can judge a migration's SQL, there has to be SQL — this is the lint suite's lowest assurance. A migration whose up() emits nothing (an empty method, one that calls no schema or DB builder) contributes nothing to a run, so it is reported rather than passed silently: a migration the run never actually checked is not a clean result.

This is distinct from an undetermined: a migration flagged by the pre-scan is never captured, so it never reaches this rule. CAP.L0.NOT_CAPTURABLE is exactly the case where capture was tried, succeeded, and got nothing.

Flagged

public function up(): void
{
// Nothing here emits SQL — the lint run has nothing to check,
// and a migration that checks nothing should not read as clean.
}

Preferred

public function up(): void
{
Schema::create('users', function (Blueprint $table): void {
$table->id();
$table->string('email');
});
}