Skip to content

supabase db reset ignores latest migration #3723

@tofsjonas

Description

@tofsjonas

Describe the bug
A clear and concise description of what the bug is.

When running supabase db reset the latest migration is ignored. If the latest migration is the only migration, it is still ignored.

npx supabase db reset
Resetting local database to version: -
Recreating database...
Initialising schema...
Seeding globals from roles.sql...
WARN: no files matched pattern: supabase/seeds/*.sql
Restarting containers...

If there is a seed file there will be an error

npx supabase db reset
Resetting local database to version: -
Recreating database...
Initialising schema...
Seeding globals from roles.sql...
Seeding data from supabase/seeds/currencies.sql...
failed to send batch: ERROR: relation "currencies" does not exist (SQLSTATE 42P01)
Try rerunning the command with --debug to troubleshoot the error.

To Reproduce
Steps to reproduce the behavior:

  1. Create a supabase project with at least one migration and a seed file. The database is created just fine, and the seed works fine.
  2. Run supabase db reset
  3. See error

Expected behavior
I would expect all of the migrations to run. The way it does if I set the latest version manually supabase db reset --version 0001

npx supabase db reset --version 0001        
Resetting local database to version: 0001
Recreating database...
Initialising schema...
Seeding globals from roles.sql...
Applying migration 0001_initial_schema.sql...
Restarting containers...

System information
Rerun the failing command with --create-ticket flag.

  • Ticket ID: ed91a67a89c74917935b6377bcc4d8d6
  • Version of OS: Apple M1 Pro, MacOS Sequoia 15.5 (24F74)
  • Version of CLI: v2.26.8
  • Version of Docker: Docker version 28.1.1, build 4eba377
  • Versions of services:
  SERVICE IMAGE           | LOCAL                  | LINKED 
  ------------------------|------------------------|--------
   supabase/postgres      | 15.8.1.085             | -      
   supabase/gotrue        | v2.176.1               | -      
   postgrest/postgrest    | v12.2.12               | -      
   supabase/realtime      | v2.36.16               | -      
   supabase/storage-api   | v1.24.6                | -      
   supabase/edge-runtime  | v1.68.0-develop.14     | -      
   supabase/studio        | 2025.06.09-sha-4c1349f | -      
   supabase/postgres-meta | v0.89.3                | -      
   supabase/logflare      | 1.14.2                 | -      
   supabase/supavisor     | 2.5.1                  | -       

Additional context
If applicable, add any other context about the problem here.

  • Version of supabase-js v2.50.0
  • Version of Node.js v22.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions