-
Notifications
You must be signed in to change notification settings - Fork 240
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
GitHub Workflow Failing: Supabase pgsodium Schema Missing on >= 2.20.4 #3358
Comments
Seeing the same issue, maybe related to #3355 (cc @sweatybridge) ? |
It's because we updated postgres to 15.8.1.060 which removed the pgsodium schema by default. As mentioned in the error message, the statement 11 of your You can fix the error by deleting or commenting out this line. |
Same error here.
It fixed the problem |
Will this be fixed in any package/dependency or will deleting the line stay as the only option? |
It's more complicated in this case because we plan to sunset the pgsodium schema on the managed platform soon. So IMO it's better to future proof your migrations by deleting this line. We've made sure that new migrations from db dump no longer rely on this schema but unfortunately we can't easily fix older migrations that live inside your repo. So sorry that you have to find out this way. May be there's a better alternative that we are not aware of. |
…tion cannot be installed anymore after supabase has updated postgres to 15.8.1.060, please take a look at this discussion: supabase/cli#3358 (comment)
@sweatybridge isn't the vault using pgsodium by default? |
Yes, it is at the moment, but it's an implementation detail of vault that we plan to change. When you run |
How will the upgrade work? We're pretty dependent on |
I'm not sure what the proper way to deal with this problem is. When I created my project I have run this line in prod in the first migration for the remote schema: CREATE EXTENSION IF NOT EXISTS "pgsodium" WITH SCHEMA "pgsodium"; Now I can of course comment out this line locally and even drop this extension in prod, but then my dev and prod migrations will diverge. Is there a better way to do this? |
Just to clarify, commenting out this line won't drop this extension currently because it's still a dependency of vault, which is installed by default. So both extensions are still enabled because it cascades. Commenting out just makes our migration easier in the future because it's not explicitly created by a migration file. |
This is indeed a problem that we need to address with pgsodium deprecation. I've looped in the postgres team to take a closer look. cc @soedirgo |
@sweatybridge I am facing the same issue currently. I tried removing all pgsodium related lines in my migrations, which works locally, but still fails in my CI. How would I go about removing this from my staging and production migrations which are now broken? When I go the Database Migrations page in the Supabase dashboard I can see that pgsodium is still present in my migration, but it is not clear to me how I can change migrations that have already been run and have now broken. |
Nevermind, I did not manage to clean up all references to pgsodium. It seems a bit sketchy, but manually dropping all pgsodium references in my old migrations fixed the issue. However I can still see |
Since you've fixed the migrations locally and CI, the remote migration history table is now outdated. You can bring them back in sync by running |
Describe the bug
it seems to me that the supabase setup tried to create the pgsodium extension before the schema.
Additional context
this issue only occurs on >= 2.20.4
The text was updated successfully, but these errors were encountered: