drizzle postgis geometry always geometry(point)
Hello, i am currently testing out the basic postGis support and it would be nice if i can get it working as desired...
Basically i want point/pointZ and linestring/linestringZ...
The 0.31.0 release added
geometry from the PostgreSQL PostGIS extension
, however, as indicated it currently only supports type: "point"
. But the release also states, that we can specify any other string to use some other type...
i was wondering what steps are necessary to get eg: linestring to work?
point: geometry("point", { type: "point" }),
or point: geometry("point", { type: "pointZ" }),
results in:
on drizzle-kit generate
with linestring i tried:
linestring: geometry("linestring", { type: "linestring" })
or linestring: geometry("linestring", { type: "linestringZ" })
resulting in:
on drizzle-kit generate
the only way to get around this issue that i am currently aware is just manually swap out the geometry(point)
with geometry(linestring)
in the generated sql and then migrate...3 Replies
I have looked a bit more into it and it seems that the geometry field is really only meant for point as sqlType for geometry seems to be hardcoded to point and the mapFrom/ToDriverValue function only supports 2 dimensional points for now...
was just trying to figure out the same thing, thanks for investigating
yes docs appear inconsistent with implementation