-
-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Description
Problem
We currently have these tests:
postgres/migrations/tests/database/exists.sql
Lines 2 to 8 in 61ff753
SELECT has_schema('public'); | |
SELECT has_schema('auth'); | |
SELECT has_schema('extensions'); | |
SELECT has_schema('graphql'); | |
SELECT has_schema('graphql_public'); | |
SELECT has_schema('realtime'); | |
SELECT has_schema('storage'); |
As one example, has_schema('storage');
is redundant with
postgres/nix/tests/expected/storage.out
Lines 1 to 14 in 61ff753
-- storage schema owner | |
select | |
n.nspname as schema_name, | |
r.rolname as owner | |
from | |
pg_namespace n | |
join | |
pg_roles r on n.nspowner = r.oid | |
where | |
n.nspname = 'storage'; | |
schema_name | owner | |
-------------+---------------- | |
storage | supabase_admin | |
(1 row) |
Which provides more information.
Editing the exists.sql
file makes up for more work on PRs (example) while not providing any more test coverage.
Additionally, it's easier to locate all storage
concerns in a single file, the same for the other schemas.
Solution
Remove migrations/tests/database/exists.sql
while ensuring the test coverage is preserved.
Metadata
Metadata
Assignees
Labels
No labels