Skip to content

Storage version mismatch causes supabase db pull to fail, breaks local DB #4815

@conte91

Description

@conte91

Describe the bug

After running supabase db pull on a fresh local instance of supabase (supabase start from a clean docker, then supabase link), the version mismatch between remote and local storage API breaks any attempt at pulling the remote DB into a local dev environment.

(This was also reported in #2473 (comment))

To Reproduce
Steps to reproduce the behavior:

  • Start with a fresh computer, or docker volume prune everything related to supabase.
  • supabase link to a project running storage-api v1.33.0
  • Run with supabase services, note that storage-api wasn't updated
    • observe warnings saying remote storage-api doesn't match local
  • supabase db pull a copy of the remote db schema
  • supabase start the database, or supabase db diff against a declarative schema
  • Any command that needs to seed the DB fails with:
ERROR: function storage.delete_prefix_hierarchy_trigger() does not exist (SQLSTATE 42883) At statement: 486 CREATE TRIGGER objects_delete_delete_prefix AFTER DELETE ON storage.objects FOR EACH ROW EXECUTE FUNCTION storage.delete_prefix_hierarchy_trigger() Try rerunning the command with --debug to troubleshoot the error.

Expected behavior

Screenshots
N/A

System information

  • Ticket ID: cbe7b37ee4784722a6a47fe7b5b9e98e
  • Version of OS: Ubuntu 24.04, ArchLinux, both running via npx supabase
  • Version of CLI: 2.75.5
  • Version of Docker: podman version 5.7.1
  • Versions of services: v1.37.0, v1.33.0 (see below)

Additional context
It's very obvious that the problem is #2473, db link doesn't do anything:

(venv) (silverstream) [simo@hans silver_stream/devops] → supabase services
WARNING: You are running different service versions locally than your linked project:
supabase/storage-api:v1.37.0 => v1.33.0
Run supabase link to update them.

  
   SERVICE IMAGE          | LOCAL                  | LINKED     
  ------------------------|------------------------|------------
   supabase/postgres      | 15.6.1.134             | 15.6.1.134 
   supabase/gotrue        | v2.186.0               | v2.186.0   
   postgrest/postgrest    | v12.2.3                | v12.2.3    
   supabase/realtime      | v2.74.7                | -          
   supabase/storage-api   | v1.37.0                | v1.33.0    
   supabase/edge-runtime  | v1.70.1                | -          
   supabase/studio        | 2026.02.04-sha-fba1944 | -          
   supabase/postgres-meta | v0.95.2                | -          
   supabase/logflare      | 1.30.8                 | -          
   supabase/supavisor     | 2.7.4                  | -          

(venv) (silverstream) [simo@hans silver_stream/devops] → supabase link    
Selected project: ldmthucwtdlofuqowgkb
Finished supabase link.
(venv) (silverstream) [simo@hans silver_stream/devops] → supabase services
WARNING: You are running different service versions locally than your linked project:
supabase/storage-api:v1.37.0 => v1.33.0
Run supabase link to update them.

  
   SERVICE IMAGE          | LOCAL                  | LINKED     
  ------------------------|------------------------|------------
   supabase/postgres      | 15.6.1.134             | 15.6.1.134 
   supabase/gotrue        | v2.186.0               | v2.186.0   
   postgrest/postgrest    | v12.2.3                | v12.2.3    
   supabase/realtime      | v2.74.7                | -          
   supabase/storage-api   | v1.37.0                | v1.33.0    
   supabase/edge-runtime  | v1.70.1                | -          
   supabase/studio        | 2026.02.04-sha-fba1944 | -          
   supabase/postgres-meta | v0.95.2                | -          
   supabase/logflare      | 1.30.8                 | -          
   supabase/supavisor     | 2.7.4                  | -          

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions