Skip to content

Commit e01b599

Browse files
committed
chore: update migration tests
1 parent 3ca5c3f commit e01b599

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

migrations/db/migrations/20240319072844_lock_down_postgres_access_to_auth_and_storage.sql renamed to migrations/db/migrations/20240319072844_lock_down_postgres_access_to_auth_migrations.sql

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,4 @@ revoke supabase_auth_admin from postgres;
33
revoke all on table auth.schema_migrations from postgres;
44
grant select on table auth.schema_migrations to postgres;
55

6-
revoke supabase_storage_admin from postgres;
7-
revoke all on table storage.migrations from postgres;
8-
grant select on table storage.migrations to postgres;
9-
106
-- migrate:down

migrations/tests/database/privs.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ SELECT schema_privs_are('extensions', 'postgres', array['CREATE', 'USAGE']);
2828
SELECT schema_privs_are('extensions', 'anon', array['USAGE']);
2929
SELECT schema_privs_are('extensions', 'authenticated', array['USAGE']);
3030
SELECT schema_privs_are('extensions', 'service_role', array['USAGE']);
31+
32+
-- Verify auth schema privileges
33+
SELECT schema_privs_are('auth', 'postgres', array['CREATE', 'USAGE']);
34+
SELECT table_privs_are('auth', 'schema_migrations', 'postgres', array['SELECT']);

migrations/tests/test.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BEGIN;
55

66
CREATE EXTENSION IF NOT EXISTS pgtap;
77

8-
SELECT plan(34);
8+
SELECT plan(36);
99

1010
\ir fixtures.sql
1111
\ir database/test.sql

0 commit comments

Comments
 (0)