Search docs

Docs search
Back to Rule Catalog
AP-DB-002Database

SQL baseline artifact exists

Checks that the SQL baseline artifact exists for database validation.

errorsetup-gapNo auto-fix

How to fix

  1. Generate or restore the SQL baseline artifact.
  2. Update configuration if the baseline moved.
  3. Keep schema artifacts current with migrations.

What it means

ArchPilot expected a SQL baseline artifact but could not find it.

Why it matters

Database rules need schema evidence to evaluate tenant and query risk accurately.

Common causes

  • The SQL baseline was not generated.
  • The database artifact path changed.
  • Schema generation is not part of the local workflow.

Example bad pattern

Database validation is enabled but db/sql baseline artifacts are absent.

Example good pattern

The repository contains current SQL/schema artifacts used by validation.

Related files/config

  • db/sql
  • packages/db/prisma/schema.prisma
  • .archpilot/architecture.json

Related CLI commands

  • archpilot validate
  • archpilot validate --ci
AP-DB-002 - SQL baseline artifact exists | ArchPilot Docs