Skip to content

fix: compose tenant db permissions#1885

Merged
leandrocp merged 1 commit into
mainfrom
fix/lp-tenant-db-baseline
May 20, 2026
Merged

fix: compose tenant db permissions#1885
leandrocp merged 1 commit into
mainfrom
fix/lp-tenant-db-baseline

Conversation

@leandrocp
Copy link
Copy Markdown
Contributor

@leandrocp leandrocp commented May 19, 2026

Running the Tenant Migrations page in LiveDashboard it generated a plan containing statements like:

REVOKE ALL ON FUNCTION realtime.apply_rls(jsonb, integer) FROM
dashboard_user;

REVOKE ALL ON FUNCTION realtime.broadcast_changes(text, text, text,
text, text, record, record, text) FROM postgres;

These and other permissions are granted by
https://github.com/supabase/postgres/tree/develop/migrations/db/migrations but missing in tenant_db_baseline.json because dev_seeds.exs drops the whole schema. I couldn't find a good reason to keep that drop so the fix is just keeping postgres init+migrations intact which is a good side effect because our compose now is closer to PROD.

Running the Tenant Migrations page in LiveDashboard it generated a plan
containing statements like:

```
REVOKE ALL ON FUNCTION realtime.apply_rls(jsonb, integer) FROM
dashboard_user;

REVOKE ALL ON FUNCTION realtime.broadcast_changes(text, text, text,
text, text, record, record, text) FROM postgres;
```

These and other permissions are granted by
https://github.com/supabase/postgres/tree/develop/migrations/db/migrations
but missing in the tenant db baseline because `dev_seeds.exs` drops the
whole schema. I couldn't find a good reason to keep that drop so the fix
is just keeping postgres init+migrations intact which is a good side
effect because our compose now is closer to PROD.
@leandrocp leandrocp changed the title fix: tenant db postgres permissions fix: compose dbs permissions May 19, 2026
@leandrocp leandrocp changed the title fix: compose dbs permissions fix: compose tenant db permissions May 19, 2026
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage is 91.177%fix/lp-tenant-db-baseline into main. No base build found for main.

@leandrocp leandrocp merged commit 2cf98f0 into main May 20, 2026
36 of 42 checks passed
@leandrocp leandrocp deleted the fix/lp-tenant-db-baseline branch May 20, 2026 13:08
@realtime-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 2.97.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants