supabse db remote throws error starting shadow database

I have multiple migrations scripts in my supabase folder. Any time I run
db remote commit
or
db remote changes
I get hit with this error
Error: Error starting shadow database: ERROR:  relation "public.my_table" does not exist
ERROR:  current transaction is aborted, commands ignored until end of transaction block

During the setup, I can see that it applies my initial remote commit (first migration file) and then throws the error on the second migration file. The first line of the second file is
alter table "public"."my_table" drop constraint "my_table_column_id_fkey";

The weird thing is that if I run
db reset
it goes through the migration files just fine. One thing to note is that I delete "my_table" entirely in a later migration, but the table is definitely initiated in the initial migration file.

I haven't wanted to make any changes on the
(actual) database because of this error, and have had to go through the steps of starting the container, creating new migration, and then pushing. Any help would be appreciated
Was this page helpful?