sqlite create new db file push programatically
Hi, I'm using
better-sqlite3
with drizzle
in my electron project and for my use case, I have some binary format data that my app can read, and I'd like to make an export to a new sqlite .db
file. I have the schemas and everything set up but I want to take the db file path from user input and just create new one on the spot and fill it with data. Is there a way to push my schema to this db file programatically just like drizzle-kit push
does normally?2 Replies
👋 drizzle kit will soon have a programmatic API (next week I guess, july 30th).
For now you can pass args to drizzle-kit (https://orm.drizzle.team/kit-docs/commands#prototype--push) ex:
I use drizzle kit programmatically like this for now
Maybe it can help?
Drizzle ORM - List of commands
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
thanks for the quick reply, I'll wait for the proper API if it should be coming so soon 🙂