CREATE INDEX missing IF NOT EXISTS in an idempotent-style repo
Part of Architecture & Best Practices, which counts for 15% of the overall score. When this check fires it deducts 2 points from that category, once per scan, no matter how many places it turns up.
What it detects
This repo uses CREATE INDEX IF NOT EXISTS elsewhere, but this statement omits it, so migrations are inconsistently re-runnable. Heuristic: it only fires when the repo has already established the idiom, never on a repo that consistently omits it by choice.
Why it matters
This repository already uses CREATE INDEX IF NOT EXISTS as its migration idiom in at least one other place. A CREATE INDEX that omits the guard breaks the same re-run-safety assumption: replaying migrations after a partial failure will error on this statement even though the rest of the migration set is designed to be idempotent.
How to fix it
Add IF NOT EXISTS to match the convention already established elsewhere in this repository's migrations, unless this specific index is deliberately meant to fail if it already exists.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo