99 / 340

pgfence

pgfence - Product Hunt launch logo and brand identity

Stop dangerous Postgres migrations before hitting production

#Developer Tools #GitHub #Database #Security

pgfence – Prevent dangerous Postgres migrations before production

Summary: pgfence is a source-available CLI tool that detects risky Postgres migrations in Node.js CI/CD pipelines by analyzing DDL to predict locking behaviors and generate zero-downtime rewrite instructions. It integrates with popular ORMs to prevent database downtime caused by hidden locking issues during schema changes.

What it does

pgfence maps migration statements to precise Postgres lock modes, scores risk based on database size, and produces safe expand/contract SQL rewrites for high-risk changes. It enforces policies by failing CI if critical safeguards like lock timeouts are missing and supports Raw SQL plus Prisma, TypeORM, Knex, Sequelize, and Drizzle.

Who it's for

It is designed for developers using Node.js ORMs who want to catch and prevent disruptive Postgres schema migrations before deployment.

Why it matters

pgfence addresses the hidden locking mechanics in Postgres migrations that cause unexpected downtime by providing precise risk detection and safe migration recipes within the Node.js ecosystem.