This PR addresses Issue #4 (Support table and sequence ownership).
It does so by doing 3 things:
Have pgbedrock generate add table and sequence ownership information into the spec that pgbedrock generates.
Have the spec_inspector module validate a variety of conditions that are necessary in order for us to manage ownerships: that a spec has no objects with multiple owners, has no objects with no owners, has no auto-dependent objects listed with owners, and has no objects in the spec that are not in the database. This allows pgbedrock configure to run without having to check a ton of edge cases while it executes.
Have pgbedrock configure manage table and sequence ownership.
I have added tests to validate that the above 3 items work as expected and have also verified that doing pgbedrock generate followed by pgbedrock configure both runs on our staging database and that it shows no changes.
I know that this PR is kind of large and painful: these 3 things all depend upon each other, so they need to all be merged into master concurrently. Ideally this might have been a feature branch with 3 separate PRs added to it. That didn't happen though, so if there's any way I can make this less painful to read through let me know.
This PR addresses Issue #4 (Support table and sequence ownership).
It does so by doing 3 things:
I have added tests to validate that the above 3 items work as expected and have also verified that doing
pgbedrock generate
followed bypgbedrock configure
both runs on our staging database and that it shows no changes.I know that this PR is kind of large and painful: these 3 things all depend upon each other, so they need to all be merged into master concurrently. Ideally this might have been a feature branch with 3 separate PRs added to it. That didn't happen though, so if there's any way I can make this less painful to read through let me know.