> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Squawk

> How CodeRabbit runs Squawk to detect unsafe PostgreSQL schema changes in migration files.

[Squawk](https://squawkhq.com) is a linter for PostgreSQL migrations. CodeRabbit runs Squawk and reports schema changes that can cause downtime, blocking locks, or compatibility problems.

CodeRabbit runs Squawk `v2.70.0`.

## Files

Squawk runs on changed SQL migration files that match these patterns:

* `**/migrations/*.sql`
* `**/migrations/**/*.sql`
* `**/migration/**/*.sql`
* `**/db/migrate/**/*.sql`
* `**/db/migration/**/*.sql`
* `**/db/migrations/**/*.sql`

SQL files outside migration directories are not included. Use [SQLFluff](https://docs.coderabbit.ai/tools/sqlfluff.md) for general SQL linting.

## Configuration

**enabled** `boolean` (default: true)

**Enable Squawk for Postgres migration linting**: Detects unsafe schema changes that can cause downtime or blocking locks

> [tab] .coderabbit.yaml
>
> ```yaml .coderabbit.yaml theme={null}
> reviews:
>   tools:
>     squawk:
>       enabled: true
> ```

> [tab] Web UI
>
> In your organization or repository settings, go to **Reviews → Tools** and turn the tool on or off with its toggle.

CodeRabbit looks recursively for a `.squawk.toml` file and uses it when present. See the [Squawk CLI documentation](https://squawkhq.com/docs/cli/) for supported options, including rule inclusion and exclusion, PostgreSQL version selection, and path exclusions.

CodeRabbit assumes each migration file runs inside a transaction. Add `-- squawk-disable-assume-in-transaction` to a migration file when your migration runner does not wrap that file in a transaction.

## Profile behavior

When the repository does not contain a `.squawk.toml` file, CodeRabbit generates a temporary configuration for the active review profile:

* **Chill** focuses on unsafe migrations, blocking locks, and breaking schema changes while excluding schema-style preferences.
* **Assertive** also enables schema preference rules such as using identity columns and timestamp types with time zones.

CodeRabbit suppresses the `require-timeout-settings` and `syntax-error` rules from review comments to reduce low-signal findings. This filtering also applies when the repository provides a `.squawk.toml` file.

## When CodeRabbit skips Squawk

CodeRabbit skips Squawk when:

* Squawk is disabled in CodeRabbit settings.
* The pull request does not change a SQL migration file matching the supported paths.
* Squawk is already running in GitHub Actions, GitLab CI, CircleCI, or Azure Pipelines.

## What's next

> [card] [Tool catalog](https://docs.coderabbit.ai/tools/list.md)
>
> Browse all linters, security analyzers, and CI/CD integrations by category and technology.

> [card] [Tools reference](https://docs.coderabbit.ai/tools/reference.md)
>
> Explore detailed specifications and configuration options for CodeRabbit tools.

> [card] [SQLFluff](https://docs.coderabbit.ai/tools/sqlfluff.md)
>
> Lint general SQL files for correctness, structure, and style.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.