-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic Extension
support.
#43
Add basic Extension
support.
#43
Conversation
Extension
support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm excited to get this in! A couple suggested changes but nothing major.
Also be sure to add a note to the README saying we support this! 🥳
@bplunkett-stripe , thanks for the feedback! I think this is ready for another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one small nit
@@ -28,6 +28,7 @@ pg-schema-diff plan --dsn "postgres://postgres:postgres@localhost:5432/postgres" | |||
- Partitions | |||
- Functions/Triggers (functions created by extensions are ignored) | |||
- Sequences | |||
- Extensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳 Excited to get this in!
98c8e6b
to
42d0bf8
Compare
14fc3db
to
e38d696
Compare
5800453
to
2caaee7
Compare
2caaee7
to
d3084ce
Compare
Description
We add basic
extension
support. This will allow declarative DDL sources to instruct the tooling to create, alter, and delete extensions so that other DDL statements dependent on these extensions are executable.Note that the full gamut of extension DDL is not currently supported, namely the ability to target and move extensions across schemas. Insofar as the schema migration tooling assumes everything is on the
public
schema, I think this is OK for now and can be implemented in a later PR.Motivation
We need
extension
support.Testing
Unit tests were added and current tests were augmented. As a result of this change, we removed the
onDbInitQueries
hook since extensions are actually supported and would otherwise require adjusting every single test case. In its stead, I altered theinternal/migration_acceptance_tests/function_cases_test.go
to include a case with an extension known to create functions and we observe they are correctly ignored.