Open taeling opened 1 year ago
I'm experiencing this same issue
Experiencing exactly the same!
Just got some help from discord to fix this, it seems that you have to manually remove the quotes around "geography(Point)" in the generated migration sql: https://discord.com/channels/1043890932593987624/1196524721152458862/1196535494675284129
I had the same issue, found a workarround:
"geography(Point)"
. CREATE EXTENSION IF NOT EXISTS postgis;
to the top of the file.This solution is not cool, because we should never touch the generated files... But it is what it is...
Another downside is that adding
CREATE EXTENSION IF NOT EXISTS postgis;
breaksdrizzle-kit push:pg
because it adds some new tables that drizzle is not aware of and tries to remove, read more about it here.
Now there's official support for the point type: https://orm.drizzle.team/learn/guides/postgis-geometry-point
Now there's official support for the point type:
https://orm.drizzle.team/learn/guides/postgis-geometry-point
@mauriciabad For now it looks like this is limited to "geometry" type right ? But "geography" type is not supported, or do I misanderstand something ?
I started a PR to implement geography
point : #3021
What version of
drizzle-orm
are you using?0.28.6
What version of
drizzle-kit
are you using?0.19.13
Describe the Bug
drizzle-kit push:pg
does not complete when using a custom type and trying to push the schema to a postgres with postgis installed (using docker); it stops with the following error:error: type "geography(Point)" does not exist
I've created a minimal reproduction:
https://codesandbox.io/p/sandbox/wandering-brook-vwwtj2
Expected behavior
The push command should complete without error. I can manually alter the table and add a column with the geography(Point) data type, so the database setup seems to be ok.
Environment & setup
Locally (Fedora) and on codesandbox