Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing row permission for credits table #62

Closed
Deanstirrat opened this issue Oct 10, 2023 · 4 comments
Closed

Missing row permission for credits table #62

Deanstirrat opened this issue Oct 10, 2023 · 4 comments

Comments

@Deanstirrat
Copy link

This may be an issue on my end but the supabase setup only allows the service_role to insert rows in the credit table but a new user needs access to create an initial row leap/train-model route. Either that or another supabase client object is needed with service_role permission like is done in the other leap routes.

Please correct me if I'm wrong.

Screenshot 2023-10-10 at 1 59 28 PM
@Marfuen
Copy link
Collaborator

Marfuen commented Oct 11, 2023

@Deanstirrat Hey, if you don't mind reseting your database, we actually just generated a supabase migration file that will handle all of the policies for you.

If you want to reset it and let it do it for you then you can run this migration on your db
https://github.com/leap-ai/headshots-starter/blob/main/supabase/migrations/20231010160942_remote_schema.sql

You can follow their guide here: https://supabase.com/docs/guides/cli/managing-environments

@Marfuen
Copy link
Collaborator

Marfuen commented Oct 11, 2023

@Deanstirrat If your issue is specifically with the service role, also, if you instantiated supabase with the service role key, then it should let you insert that first row.

@Marfuen
Copy link
Collaborator

Marfuen commented Oct 11, 2023

More info / screenshots could help

@Deanstirrat
Copy link
Author

@Marfuen got mine working. Thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants