Create query inserts quotes for customType with push

Hey people.
So i am using PostGIS as my database, and i created a custom type for the geogrraphy point
export const geoPoint = customType<{ data: never }>({
    dataType() {
        return "geography(Point, 4326)";
    },
    toDriver(value: Point) {
        return sql`ST_MakePoint(${value.latitude}, ${value.longitude})`;
    },
});

The issue lies when i use
drizzle-kit push
, it makes a create query that puts the type inside quotations marks (which breaks the db query)
How do i make it so that it creates the DB creation query correctly ?

...
"coords" "geography(Point, 4326)" NOT NULL,
...

error: type "geography(Point, 4326)" does not exist
Was this page helpful?