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 the internal/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.
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.