stripe / pg-schema-diff

Go library for diffing Postgres schemas and generating SQL migrations
MIT License
278 stars 20 forks source link

Online not null constraints: `SET NOT NULL` #83

Closed bplunkett-stripe closed 6 months ago

bplunkett-stripe commented 6 months ago

Description

Use check constraints to make SET NOT NULL constraints online

One exception: This does not yet work for partitioned tables, since we don't yet support local check constraints

Motivation

https://github.com/stripe/pg-schema-diff/issues/82

Testing

Tested via unit tests