drizzle
No update or delete without a where clause, and migrations that match the schema. It requires javascript.
Selected when
Section titled “Selected when”A scope has a dependency on drizzle-orm.
Checks
Section titled “Checks”stale-migrations
Section titled “stale-migrations”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.
What to do
Section titled “What to do”Run drizzle-kit generate and commit the migration.
Example
Section titled “Example”A schema change with no new migration reports drift. Run drizzle-kit generate, review the migration, and commit it.
Lint rules
Section titled “Lint rules”| 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. |
Turn it off
Section titled “Turn it off”gspot ignore drizzle/stale-migrations --paths "<path>" --reason "<why>"gspot ignore drizzle/stale-migrations --rule stale --reason "<why>"Settings
Section titled “Settings”| Setting | What it sets |
|---|---|
drizzle.client_names |
The Drizzle client identifiers checked for update and delete operations without a where clause. |
Rules for coding agents
Section titled “Rules for coding agents”| Rule file | Installed when |
|---|---|
.gspot/rules/DRIZZLE.md |
The repository has a dependency on pg, postgres, or @neondatabase/serverless. |
Tools and versions
Section titled “Tools and versions”| Tool | Version |
|---|---|
| eslint-plugin-drizzle | 0.2.3 |
| drizzle-kit | 0.21.0 or later, install it yourself |