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.07k stars 209 forks source link

--no-backup flag no longer deletes docker volumes #2230

Closed barbinbrad closed 6 months ago

barbinbrad commented 6 months ago

Describe the bug On the newest version of the CLI the --no-backup flag does not remove the volumes

To Reproduce Steps to reproduce the behavior:

npx --yes supabase stop --no-backup

Expected behavior The volumes are removed when --no-backup is passed

System information

sweatybridge commented 6 months ago

Hello, which cli version did you upgrade from? Which docker version are you running?

barbinbrad commented 6 months ago

Hello, which cli version did you upgrade from? Which docker version are you running?

Upgrade from 1.145.4 Docker version 26.0.0, build 2ae903e MacOS Sonoma 14.3

barbinbrad commented 6 months ago

After running supabase stop --no-backup and then running supabase start the CLI outputs "Starting database from backup..." and it does not run the migrations.

sweatybridge commented 6 months ago

Our documentation recommends running supabase stop --no-backup before upgrading. https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli

If you didn't do that, an alternative is to delete all docker volumes manually with docker volume prune -a or one by one with docker volume rm

barbinbrad commented 6 months ago

I've been deleting the docker volumes manually each time I run supabase stop --no-backup -- but is there any good way to get back to a state where this isn't required?

sweatybridge commented 6 months ago

I can't reproduce this locally though. Could you report the output from docker volume ls before and after? ie. it should be empty

$ docker volume ls
DRIVER    VOLUME NAME
$ supabase start
$ supabase stop --no-backup
$ docker volume ls
DRIVER    VOLUME NAME