> ## 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 version 2.59.0 and reports schema changes that can cause downtime, blocking locks, or compatibility problems.

## 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](/tools/sqlfluff) for general SQL linting.

## Configuration

Squawk is enabled by default. Enable or disable it with `.coderabbit.yaml` or the CodeRabbit web UI:

<Tabs>
  <Tab title=".coderabbit.yaml">
    ```yaml .coderabbit.yaml theme={null}
    reviews:
      tools:
        squawk:
          enabled: true
    ```
  </Tab>

  <Tab title="Web UI">
    Go to **Reviews > Tools > Squawk** in your organization or repository settings and toggle Squawk `on` or `off`.
  </Tab>
</Tabs>

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 workflows.

## What's next

<CardGroup cols={1}>
  <Card title="Tool catalog" href="/tools/list" icon="list" horizontal>
    Browse all linters, security analyzers, and CI/CD integrations by category and technology.
  </Card>

  <Card title="Tools reference" href="/tools/reference" icon="wrench" horizontal>
    Explore detailed specifications and configuration options for CodeRabbit tools.
  </Card>

  <Card title="SQLFluff" href="/tools/sqlfluff" icon="database" horizontal>
    Lint general SQL files for correctness, structure, and style.
  </Card>
</CardGroup>
