{"repo":"stripe/pg-schema-diff","free":true,"listed":false,"github":"https://github.com/stripe/pg-schema-diff","clone":"git clone https://github.com/stripe/pg-schema-diff.git","description":"Go library for diffing Postgres schemas and generating SQL migrations","language":"Go","stars":872,"topics":["golang","postgres","postgres-schema","postgres-schema-diff"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg-schema-diff Computes the diff(erences) between Postgres database schemas and generates the SQL required to get your database schema from point A to B with minimal downtime & locks. This enables you to take your database and migrate it to any desired schema defined in plain DDL. The tooling attempts to use native postgres migration operations to perform online migrations and avoid locking wherever possible. Not all migrations will be lock-free and some might require downtime, but the hazards system will warn you ahead of time when that's the case. Stateful online migration techniques, like shadow tables, aren't yet supported. Online index Replacement Your project's diff: The generated plan ( queries using message idx will always have an index backing them, even while the new index is being built ): Online NOT NULL constraint creation Your project's diff: The generated plan ( leverages check constraints to eliminate the need for a long-lived access-exclusive lock on the table ): Key features Declarative schema migrations The use of postgres native operations for zero-downtime migrations wherever possible: Concurrent index builds Online index replacement: If some index is changed, the new version will be built before the old version is dropped, preventing a window where no index is backing queries Online constraint builds: Constraints (check, foreign key) are added as INVALID before being validated, eliminating the need for a long access-exclusive lock on the table Online NOT","default_branch":null,"files":null,"tree":[],"storefront":"/r/stripe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/stripe/pg-schema-diff/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}