Supabase CLI fails to start locally due to missing `type` column in `buckets` table
Summary
Supabase CLI (v2.31.4 via Homebrew) fails to start the local development server due to a database error:
column "type" does not exist
in the buckets and buckets_analytics tables.
This occurs after fresh project initialization, full reset, and Docker image cleanup. The error blocks local development even without any custom storage or bucket migrations.
Steps to Reproduce
- Install Supabase CLI via Homebrew
brew install supabase(v2.31.4) - Initialize a new project:
supabase init - Create a simple migration (optional, e.g., single migration for a
profilestable). - Stop and remove all Supabase-related containers and images:
supabase stop --no-backup rm -rf .supabase docker ps -a --filter "name=supabase" --format "{{.ID}}" | xargs -r docker rm -f docker images --filter=reference='supabase/*' --format '{{.Repository}}:{{.Tag}}' | xargs -r docker rmi -f - Start Supabase locally:
supabase start - Observe the error output in the CLI.
Actual Error Output
Error status 500: {"statusCode":"500","code":"DatabaseError","error":"DatabaseError","message":"select * from ((select \"id\", \"name\", \"type\", \"public\", \"owner\", \"created_at\", \"updated_at\", \"file_size_limit\", \"allowed_mime_types\" from \"buckets\") union all (select \"id\", \"id\" as \"name\", \"type\", null as \"public\", null as \"owner\", \"created_at\", \"updated_at\", null as \"file_size_limit\", null as \"allowed_mime_types\" from \"buckets_analytics\")) as \"all_buckets\" - column \"type\" does not exist"}
- The error is thrown by a background process in the CLI querying for storage buckets.
- No custom code or migrations related to buckets/storage exist in the project.
Environment Details
- OS: macOS (Darwin 24.5.0)
- Supabase CLI version: 2.31.4 (Homebrew)
- Docker: Latest, freshly pulled images
- Project Schema: Only a single migration for a
profilestable. No custom storage/buckets/analytics migrations. - Supabase config:
[storage] enabled = trueinsupabase/config.toml. No custom bucket definitions. - No
seed.sqlpresent.
Troubleshooting Steps Taken
- Stopped and removed all Supabase containers and volumes.
- Deleted all Supabase Docker images.
- Deleted
.supabasedirectory to force clean initialization. - Upgraded Supabase CLI to the latest version.
- Attempted manual schema patch (unable to connect as database doesn’t start).
- Tried starting with and without migrations—error persists.
Diagnostics and Observations
- The CLI’s internal query expects a
typecolumn in bothbucketsandbuckets_analyticstables. - Local database schema does not include these columns after a fresh start/reset, suggesting a core schema or migration bug with CLI v2.31.x.
- No custom SQL or migrations interfere with storage tables.
- The error blocks local development entirely; cannot connect to DB to patch manually.
- No currently open GitHub issue matches this exact error.
Expected Behavior
- Supabase CLI should automatically initialize all required storage system tables and columns, including the
typecolumn, on a fresh local start/reset. - Local development should function out-of-the-box without manual schema intervention.
Impact
- Unable to run Supabase locally for development or testing.
- No workaround available, as system tables cannot be patched without a running database.
- Project is blocked until bug is resolved.
Request
- Please investigate and patch the CLI or Docker images to ensure the storage schema is fully initialized.
- If a manual workaround is available (e.g., SQL to patch the schema before startup), please provide detailed instructions.
- Advise if a specific CLI or Docker image version is required for local development compatibility.
Thank you for addressing this blocker!
Experiencing the same thing. I solved it by turning storage off in config.toml for now but locally that is a real pain.
+1
Same here. Supabase SDK 2.31.4 installed by homebrew, tried remove docker and everything but not helped. Turning storage off in config.toml for now.
this looks like a duplicate of https://github.com/supabase/cli/issues/3863#issuecomment-3077276245
I've released a fix to beta channel.
npx supabase@beta start
Wow, this just costed me 6 hours of debugging. Thanks, Supabase.