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...
type

The current release has a predefined type: point, which is the geometry(Point) type in the PostgreSQL PostGIS extension. You can specify any string there if you want 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:
CREATE TABLE "test" (
    "point" geometry(point)
)

on drizzle-kit generate

with linestring i tried:
linestring: geometry("linestring", { type: "linestring" }) or linestring: geometry("linestring", { type: "linestringZ" })
resulting in:
CREATE TABLE "test" (
    "linestring" geometry(point)
)

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...
Was this page helpful?