Closed Davidtozz closed 7 months ago
Do you have create extension if not exists pg_jsonschema
in any of your migration files?
Nope, I solved the issue by including that line in my first migration file. Can't believe the issue was that simple, thanks a lot!
Describe the bug Using the diff command with extensions not enabled by default results in error. In my case, i enabled (other than the default extensions) the
pg_jsonschema
extensions, to validate a column holding JSONB data. It seems that the shadow db, created during the execution of the diff command, doesn't take into account possible extensions enabled on the main supabase instance, and therefore apply them before comparing changes.To Reproduce Steps to reproduce the behavior:
pg_jsonschema
supabase db diff
Expected behavior No errors are thrown, shadow db and the command outputs the expected result
Screenshots If applicable, add screenshots to help explain your problem.
System information Rerun the failing command with
--create-ticket
flag.-- supabase/postgres 15.1.0.147
-- supabase/gotrue v2.143.0
-- postgrest/postgrest v12.0.1
-- supabase/realtime v2.25.66
-- supabase/storage-api v0.46.4
-- supabase/edge-runtime v1.38.0
-- supabase/studio 20240301-0942bfe
-- supabase/postgres-meta v0.79.0
-- supabase/logflare 1.4.0
-- bitnami/pgbouncer 1.20.1-debian-11-r39 -- darthsim/imgproxy v3.8.0
Additional context If applicable, add any other context about the problem here.