L-Mario564 / drizzle-dbml-generator

Generate DBML markup from your schema defined with Drizzle ORM.
MIT License
161 stars 8 forks source link

fix: Support new Postgres index API #13

Closed rorz closed 5 months ago

rorz commented 5 months ago

Drizzle 0.31.0 introduced a breaking change to the Postgres indexes API. The lack of support in drizzle-dbml-generator for enriched "extra config" columns led to two failure scenarios with the current build:

  1. Unrecognised ordering options in extra config e.g. tbl.f1.asc() (asc() not found in standard column type)
  2. Inability for the underlying drizzle-orm calls to use the indexes. JSON parsing would fail since the defaultConfig on a given column wasn't being set or enriched.

What has changed


resolves #12