supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.02k stars 201 forks source link

Database not healthy on `npx supabase db diff --linked -f <migration__filename>` #2037

Closed gorayaa66 closed 6 months ago

gorayaa66 commented 6 months ago

Describe the bug Everything was working fine and then all of a sudden it stopped working.

To Reproduce These are the deps i'm using and i linked it to the remote supabase project. "dependencies": { "@supabase/supabase-js": "^1.35.7", "dotenv": "^16.3.1", "supabase": "^1.144.2" }

Expected behavior It should download the database diff in the file specified.

System information

sweatybridge commented 6 months ago
supabase/postgres │ 15.1.0.37 │ 15.1.0.37

Your postgres image version appears to be quite outdated. For any versions below 15.1.0.55, you will likely run into some edge cases not handled by CLI upgrade. Could you try upgrading your project via the dashboard? https://supabase.com/dashboard/project/_/settings/infrastructure

After that, relink your project and reset your local database.

supabase link
supabase stop --no-backup
supabase start
gorayaa66 commented 6 months ago

@sweatybridge yes it worked. Thanks