Local Migrations Don't Copy Database Roles
I'm trying to set up local Supabase for testing. I use a tool called PowerSync which requires its own
powersync_role
role. I'm trying to copy my schema from my linked cloud database to my local one, but the migration tries to apply rules set for the powersync_role
without actually creating the role, so the migration fails. Am I doing something wrong? How do I fix this?7 Replies
Not completely familiar with this but I know the roles are a special case.
There are several role flags for CLI things...
https://supabase.com/docs/reference/cli/supabase-db-push

It looks like that's for
db push
. I'm trying to copy cloud schema to my local environment, which uses db pull
. It doesn't seem to have that flagNot really sure, but I think they have to be handled specially in roles.sql.
https://supabase.com/docs/reference/cli/supabase-db-dump
Great, I noticed one of the commands referenced a roles.sql. It looks like that's what I needed to do, thank you
I'm now getting an error running
db diff
about it not being able to reach my database, but I'm sure that's a different issueAnd, I won't be much help as I don't use this.
I'd start a new topic if you have more and I'll let others answer even if not tonight.
Right, thank you for your help