Metadata-Version: 2.4
Name: rulestamp-pg-migration-lock-lint
Version: 1.0.7
Summary: Names every statement in a Rails, Django or raw SQL migration that takes a table-blocking Postgres lock, and prints the non-blocking rewrite. 36 rules, PostgreSQL 12-17. (bundled Node.js runtime)
Author-email: Rulestamp <support@getreadystack.com>
License: Proprietary - see LICENSE.txt
Project-URL: Homepage, https://getreadystack.com/tools/pg-migration-lock-lint?ref=pypi
Project-URL: Documentation, https://getreadystack.com/tools/pg-migration-lock-lint?ref=pypi
Project-URL: Support, https://getreadystack.com/support
Keywords: postgres,migration,sql,lock,rails,django,lint,downtime
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: nodejs-wheel-binaries>=20
Dynamic: license-file

# Postgres Migration Lock Lint

> Runs the same checker as our npm package on a Node.js runtime that pip installs for you (`nodejs-wheel-binaries`) - no system Node.js needed. Your files are checked locally.

![Postgres Migration Lint - locks and downtime (ALTER TABLE, CREATE INDEX) — finds the line](https://getreadystack.com/img/promo/pg-migration-lock-lint_demo.gif)

Names every statement in a Rails, Django or raw SQL migration that takes a table-blocking Postgres lock, and prints the non-blocking rewrite. 36 rules, PostgreSQL 12-17.

## Install

```
pg-migration-lock-lint file
```

Node 18+. The same 36 rules as the VS Code extension, from a terminal or CI.

## Free

- Check the migration file you have open against all 36 rules and get the lock mode, the failure and the safe rewrite for every statement.
- `--rules` lists every rule

## With a licence ($29 once)

- Check every migration in the workspace in one pass, export the review as Markdown or JSON for the change ticket, and fail CI on an exit code.

```
pg-migration-lock-lint --dir ./templates --report html --out report.html
```

Independent Postgres consultancies bill migration and lock review at $150/hour and up; this is one review, priced once.

## Use from an AI agent (MCP)

Claude Code · Cursor · Windsurf · any MCP client - add to your MCP config:

```json
{ "mcpServers": { "pg-migration-lock-lint": { "command": "pg-migration-lock-lint", "args": ["--mcp"] } } }
```

Tools: `check_text` and `check_file` (free) · `check_dir` (licence). The agent gets every finding with the line number.

## Use in CI

```yaml
- name: Postgres Migration Lock Lint
  run: pip install rulestamp-pg-migration-lock-lint && pg-migration-lock-lint --dir . --ci
```


The folder sweep, reports and CI mode need one licence — one payment, no subscription. Set `READYSTACK_LICENSE=<key>` or run `--license <key>` once.

[Get a licence](https://getreadystack.com/api/buy/cl/polar_cl_zaJ9pwhlczNQZUXiIKP3wGCzfzxe2LYQ6mMD02xD1j5)


<!-- pg migration lock lint -->


## Install (PyPI)

```
pip install rulestamp-pg-migration-lock-lint
pg-migration-lock-lint --help
```
