L-Mario564 / drizzle-dbml-generator

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

still seems broken when using sqliteGenerate on newer version of drizzle-orm (0.29) #19

Closed agotfredsen82 closed 1 month ago

agotfredsen82 commented 2 months ago

Hi. Thanks for great work with this package . it's awesome . however it does not work on newer version 0.29 and later regarding sqliteGenerate ... it just results in a blank dbms file with no errors . it works using drizzle-orm 0.29 bot not the latest version after that ..

I read that you fixed it for pgGenerate but seems someone forgot sqliteGenerate :-)

import { sqliteGenerate } from "drizzle-dbml-generator"; import path from "path"; import { fileURLToPath } from "url"; import * as schema from "../modules/schema.js";

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const out = path.resolve(__dirname, "./schema.dbml");

sqliteGenerate({ schema, out, relational: false });

L-Mario564 commented 1 month ago

Fixed in latest release.