supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.01k stars 199 forks source link

ERROR: type "geography" does not exist (SQLSTATE 42704) when running `db diff` #2620

Open SEI-John opened 3 weeks ago

SEI-John commented 3 weeks ago

Describe the bug supabase db diff is not completing successfully, and cannot see the geography type which is a postgis plugin type.

I've verified that both my remote and local databases have the type registered as \dT geography will return:

postgres=> \dT geography
                                                      List of data types
   Schema   |   Name    |                                             Description
------------+-----------+------------------------------------------------------------------------------------------------------
 extensions | geography | postgis type: The type representing spatial features with geodetic (ellipsoidal) coordinate systems.
(1 row)

I have a few different schemas outside of public, and I'm wondering if this is causing the issue specifically. I have a schema called hydrology which has a table called access_point and uses a geography datatype column.

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

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

abuuzayr commented 3 weeks ago

I have a similar issue. I have enabled plv8 manually via Supabase Studio on my local, but running db diff i will get this error:

ERROR: language "plv8" does not exist (SQLSTATE 42704)