---
name: php186-skill-76977
description: "在审查变成停机时间之前，在PostgreSQL迁移SQL中捕获锁定、索引和模式更改风险。"
---

# 在不可逆的模式错误进入生产环境之前，使用 Squawk 对 PostgreSQL 迁移和 SQL 变更进行 Lint 检查

## 在不可逆的模式错误进入生产环境之前，使用 Squawk 对 PostgreSQL 迁移和 SQL 变更进行 Lint 检查

 

Catch locking, indexing, and schema-change hazards in PostgreSQL migration SQL before a review turns into downtime.

 

## Prerequisites

 

Squawk CLI or container image, PostgreSQL migration SQL files, and optional CI or pre-commit integration.

 

## Installation

 

Use the upstream install or setup path that matches your environment:

 

- npm install -g squawk-cli
- pip install squawk-cli
- docker run --rm -v $(pwd):/data ghcr.io/sbdchd/squawk:latest \*.sql
- cargo install

 

Requirements and caveats from upstream:

 

- ### Or via Docker
- You can also run Squawk using Docker. The official image is available on GitHub Container Registry.
- warning\[prefer-text-field\]: Changing the size of a varchar field requires an ACCESS EXCLUSIVE lock, that will prevent all reads and writes to the table.

 

Basic usage or getting-started notes:

 

- Quick Start | Playground | Rules Documentation | GitHub Action | \[DIY GitHub Int...
- shell
- ## or via PYPI
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/sbdchd/squawk/HEAD/README.md

 

## Documentation

 

- https://squawkhq.com
