ERROR: relation "query_results_extended" does not exist (SQLSTATE 42P01)
I get this error after running
supabase db diff -f create_brand_visibility_averages_view:
But on my local supabase project the view exists and is shown in dashboard.
I'm just folowing this Declarative database schemas tutorial.Declarative database schemas | Supabase Docs
Manage your database schemas in one place and generate versioned migrations.

5 Replies
query_results_extended should be created first before brand_visibility_averages_viewhttps://supabase.com/docs/reference/cli/supabase-db-diff you need to add the --local flag if diffing against local migration files
CLI Reference | Supabase Docs
CLI reference for the Supabase CLI
I solved the issue but don’t remember what I did
I think I deleted the migration history and did supabase db pull or something
yeah that will reset it it to baseline which is always an option
But yeah I don’t really like declarative schemas because they drop triggers in auth schemas and other non public schemas.