Will It Vibe logoWill It Vibe?
SQL-011Info severity-2 points

CREATE TABLE 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 TABLE 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 TABLE IF NOT EXISTS as its migration idiom in at least one other place, which means the team is relying on migrations being safe to re-run. A CREATE TABLE that omits the guard breaks that assumption silently: re-running migrations (a common recovery step after a partial failure) will error on this exact statement while every other one in the file succeeds quietly.

How to fix it

Add IF NOT EXISTS to match the convention already established elsewhere in this repository's migrations, unless this specific table is deliberately meant to fail if it already exists (for example, to catch an unexpected duplicate migration run).

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

Related Architecture & Best Practices checks