Prateik
Prateik

Reputation: 55

How to modify a Supabase table from the dashboard UI or the Supabase SQL editor?

Whenever I try to modify an existing table in the Supabase dashboard, I get this error "Failed to pg.columns: must be owner of table <table_name>". This seems to be like a permission issue but I'm not sure what has to be done to fix this.

I have also tried to run the SQL script to ALTER the table, but I still get the same error saying I must be the owner of the table.

Failed to run sql query: must be owner of table online_users

This project is hosted on Supabase cloud and I'm not self-hosting this project. Also, I have disabled RLS for the table which I'm trying to modify.

I have tried granting permissions using these commands that I found on other similar permission issues for Supabase. But even these commands return the following errors -

GRANT supabase_admin TO postgres;

"Failed to run sql query: must be superuser to alter superusers"

ALTER USER postgres WITH superuser;

"Failed to run sql query: must be superuser to alter superuser roles or change superuser attribute"

Any help is appreciated! Thanks.

Upvotes: 3

Views: 2738

Answers (2)

Prateik
Prateik

Reputation: 55

I eventually contacted the support, and they asked me to execute a couple of scripts in my dashboard. The scripts they provided kept failing, and after a couple of days, they fixed it from their end. Now the issue is resolved.

P.S. Their support was pretty good and they always got back to me within a day.

Upvotes: 0

Don Giovanni
Don Giovanni

Reputation: 11

Same, i posted this in the reddit group yesterday and they said to log a ticket with Supabase.

The only way i was able to solve it in a timely manner (I'm on the free tier) was to create a new workspace and recreate the table. Luckily i had backups of the data. I looked through all the settings and nothing's different from my end as far as i can see. So i'm guessing Supabase did something to mess this up for everyone.

Upvotes: 1

Related Questions