Conversation
Fixes #1437. Now that the effects of the `migrations/db/init-scripts` are fully tested on the following files: - [nix/tests/sql/auth.out](https://github.com/supabase/postgres/blob/develop/nix/tests/expected/auth.out) - [nix/tests/sql/storage.out](https://github.com/supabase/postgres/blob/develop/nix/tests/expected/storage.out) - [nix/tests/sql/roles.out](https://github.com/supabase/postgres/blob/develop/nix/tests/expected/roles.out) - [nix/tests/sql/evtrigs.out](https://github.com/supabase/postgres/blob/develop/nix/tests/expected/evtrigs.out) - [nix/tests/sql/extensions_schema.out](https://github.com/supabase/postgres/blob/develop/nix/tests/expected/extensions_schema.out) - [nix/tests/sql/realtime.out](https://github.com/supabase/postgres/blob/develop/nix/tests/expected/realtime.out) This reattempts to move `migrations/db/init-scripts` to `migrations/db/migrations` and have a single directory for migrations. Of the above tests, the only change pertains to the event triggers owners which is the problem on #1437. This requires modifying migrations, but the changes are more about following best practices: + Makes migrations idempotent. + [alter default privileges](https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html) explicitly list postgres as the target role. + Also: - adds a conditional for pgjwt which is not available on the 17 version - Realtime publication maintains the same postgres owner
| issue_pg_net_access | postgres | extensions | grant_pg_net_access | postgres | ||
| issue_pg_net_access | supabase_admin | extensions | grant_pg_net_access | supabase_admin | ||
| issue_pg_graphql_access | supabase_admin | extensions | grant_pg_graphql_access | supabase_admin | ||
| issue_graphql_placeholder | supabase_admin | extensions | set_graphql_placeholder | supabase_admin | ||
| pgrst_ddl_watch | supabase_admin | extensions | pgrst_ddl_watch | supabase_admin | ||
| pgrst_drop_watch | supabase_admin | extensions | pgrst_drop_watch | supabase_admin | ||
| graphql_watch_ddl | supabase_admin | graphql | graphql.increment_schema_version | supabase_admin | ||
| graphql_watch_drop | supabase_admin | graphql | graphql.increment_schema_version | supabase_admin | ||
| issue_pg_cron_access | supabase_admin | extensions | grant_pg_cron_access | postgres | ||
| issue_pg_cron_access | supabase_admin | extensions | grant_pg_cron_access | supabase_admin |
There was a problem hiding this comment.
This is the only change in tests. Which proves #1437 is solved, without affecting other aspects of the db.
There was a problem hiding this comment.
This is actually moved, but git/github doesn't recognize it as such because there are some modifications.
|
Has this been tested on local infra, minimally for project creation? |
Is that part of a CI job? If that's required, then why it's not? |
|
Let's prefer #1511 for now. |
It's not part of a CI job. We don't have a test harness that can do E2E testing of new AMI candidates so this needs to be done manually. See the WIP deployment playbook for reference |
Fixes #1437.
Now that the effects of the
migrations/db/init-scriptsare fully tested on the following files:This reattempts to move
migrations/db/init-scriptstomigrations/db/migrationsand have a single directory for migrations.Of the above tests, the only change pertains to the event triggers owners which is the problem on #1437.
This requires modifying migrations, but the changes are more about following best practices: