Supabase Error: ERROR: column "public" of relation "buckets" does not exist
We're seeing a strange error after upgrading our npm supabase package from v2.40.1 to v2.45.5 (for compliance reasons).
Our CI is broken and we're unable to proceed work.
We cannot run supabase locally.
We have previous db migrations such as 20250321022805_storage_bucket_creation_and_rls.sql:
What do we do? What version of supabase is the hosted version running so we can match that version locally?
17 Replies
did you run
supabase db reset after a migration. or did you just do supabase start The former will delete schema changes not contained within migrations so if you are going to run it, do so cautiously
i'm not sure why it is complaining about the public column. I think that column has been there for a whileWe can't even start the local db to reset because it won't start due to this migration issue. We ran
supabase db resetWe have 112 db migrations.
Here's the full command that is failing (running
supabase start):Where
20250321022805_storage_bucket_creation_and_rls.sql has something like:
I mean, this is HUGE if Supabase is changing the schema for tables in different versionsThe schemas change constantly in auth/storage/realtime.
public looks like a field in the latest storage.buckets
Public was added to the schema 2 years ago. So something is wiping your storage schema. https://github.com/supabase/storage/blob/master/migrations/tenant/0008-add-public-to-buckets.sql
hmm, then
ERROR: column "public" of relation "buckets" does not exist (SQLSTATE 42703) is very odd then.I was just answering your question on schemas changing and the public column specifically. I don't know what is going wrong for you.
Not sure what your side means.
If you are talking Discord. There are numerous discussions involving these types of things with migrations and Supabase schemas and they occur off and on all the time. Most thought are getting out of sync between local and hosted versions.
This is a user helping user forum so if there is a bug won't be resolved here.
That CLI issue seems like a good place to pursue it.
That CLI issue seems like a good place to pursue it.
This is a big issue for us too. There are numerous new comments on this https://github.com/supabase/cli/issues/1277 in the last hours. It seems like user defined db migrations are executed before the built in schemas are finalized (specifically for storage).
GitHub
`ERROR: column "public" of relation "buckets" does not exist (SQLST...
Describe the bug I was previously using v1.68.6 of the cli, and had no problem running migrations that included, among other things: -- supabase/migrations/20230420235920_buckets.sql insert into st...
Might I suggest one of you open a new issue as that one is closed and might have been something different at the time.
I've not looked over there yet other than to see the date and that it is closed.
You could also start support requests.
I've bumped a CLI dev to that github issue. No idea on his status or if or when he will see it though so you should still consider a new issue so other devs might notice.
Support request was:
SU-254337
Qiao Han, Supabase engineer provided a fix in beta.He is the one I contacted.
Thanks
I just ran into this issue as well. Reading that issue 1277 gave me the clue to update the supabase CLI to the latest (from v2.40.7 to v2.48.3) and somehow that seems to have fixed it.
https://discord.com/channels/839993398554656828/1423374882296827954