Skip to main content

sarj-sql-lint

Deterministic PostgreSQL migration rules for safe, repeatable schema changes.

Package metadata

Field Value
Version 0.10.0
Registry PyPI
License MIT
Runtime Python >=3.14

Command-line reference

Command Entrypoint Help
sarj-sql-lint sarj_sql_lint.__main__:main sarj-sql-lint --help

Rule catalog

Rule Summary Default Autofix
sql:add-constraint-requires-not-valid ADD CONSTRAINT (CHECK/FK) without NOT VALID blocks writes during full-table validation. error none
sql:enforce-timestamptz TIMESTAMP without TIME ZONE — use TIMESTAMPTZ. error none
sql:idempotent-ddl DDL without IF [NOT] EXISTS — migrations must be safe to re-run. error none
sql:index-concurrently CREATE INDEX without CONCURRENTLY — locks the table against writes. error none
sql:insert-requires-on-conflict INSERT without ON CONFLICT — migration data writes must be idempotent upserts. error none
sql:no-offset-pagination OFFSET pagination — use cursor pagination (WHERE id > :cursor). error none
sql:no-pg-enum CREATE TYPE ... AS ENUM — use TEXT + CHECK constraint instead. error none
sql:prefer-jsonb JSON column type or ::json cast — use JSONB. error none
sql:prefer-text-over-varchar VARCHAR(n) — use TEXT (+ CHECK length if needed). error none
sql:prefer-uuidv7-default gen_random_uuid() emits a random UUIDv4 — use uuidv7() so keys are time-ordered. error none
sql:require-fk-index FOREIGN KEY column missing index — causes full-table scans and locks on parent row deletes. error none
sql:require-lock-timeout DDL migration missing positive SET [LOCAL] lock_timeout or statement_timeout prior to DDL. error none

Project links

Package metadata is generated from pyproject.toml.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sarj_sql_lint-0.10.0-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file sarj_sql_lint-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: sarj_sql_lint-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sarj_sql_lint-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 867fe3fc96747353d826ea33e748d4db11e18684d9108954e60f0e10c3983ec2
MD5 e43b8e3c93e4b1c53e058127305e67dd
BLAKE2b-256 71789fb4d0a338d594389a0c60a966975aa5090f3790ab07dfcf6a3616a6f4b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for sarj_sql_lint-0.10.0-py3-none-any.whl:

Publisher: release.yml on sarj-ai/standards

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page