Skip to content

drizzle

No update or delete without a where clause, and migrations that match the schema. It requires javascript.

A scope has a dependency on drizzle-orm.

Runs drizzle-kit generate and fails when it creates a migration.

Runs at the push stage, once per scope, with drizzle-kit, and loads your code.

A schema change with no migration works only on the machine that pushed it.

Run drizzle-kit generate and commit the migration.

A schema change with no new migration reports drift. Run drizzle-kit generate, review the migration, and commit it.

Rule What it checks What to do
stale Each committed file holds what the generator command writes now. Run the generator command, and commit the new file after you read the diff.
missing Each file that the check compares with the generator output exists. Run the generator command, then add the file to Git.
untracked Git tracks each file that the generator writes. Add the file with git add, and commit it.
gspot ignore drizzle/stale-migrations --paths "<path>" --reason "<why>"
gspot ignore drizzle/stale-migrations --rule stale --reason "<why>"
Setting What it sets
drizzle.client_names The Drizzle client identifiers checked for update and delete operations without a where clause.
Rule file Installed when
.gspot/rules/DRIZZLE.md The repository has a dependency on pg, postgres, or @neondatabase/serverless.
Tool Version
eslint-plugin-drizzle 0.2.3
drizzle-kit 0.21.0 or later, install it yourself