Skip to content

Comments

Add support for NOT VALID check constraints in PostgreSQL#40192

Merged
eugeneius merged 1 commit intorails:masterfrom
agrobbin:postgresql-not-valid-check-constraint
Sep 8, 2020
Merged

Add support for NOT VALID check constraints in PostgreSQL#40192
eugeneius merged 1 commit intorails:masterfrom
agrobbin:postgresql-not-valid-check-constraint

Conversation

@agrobbin
Copy link
Contributor

@agrobbin agrobbin commented Sep 7, 2020

Summary

Active Record already supports adding NOT VALID foreign key constraints in PostgreSQL, but back in #31323 when check constraint support was initially added, the ability to add a check constraint and validate it separately was not included. This adds that functionality!

Copy link
Member

@eugeneius eugeneius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @agrobbin! I checked this out locally and it works great 😏

Active Record already supports adding `NOT VALID` foreign key constraints in PostgreSQL, but back in rails#31323 when check constraint support was initially added, the ability to add a check constraint and validate it separately was not included. This adds that functionality!
@agrobbin agrobbin force-pushed the postgresql-not-valid-check-constraint branch from d07f05e to 368da3e Compare September 7, 2020 23:47
@agrobbin agrobbin requested a review from eugeneius September 7, 2020 23:49
@eugeneius eugeneius merged commit 78a8188 into rails:master Sep 8, 2020
@agrobbin
Copy link
Contributor Author

agrobbin commented Sep 8, 2020

Thanks so much for the quick review + merge here @eugeneius! Excited to see this in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants