any way to push to a sqlite database using javascript? without using the command
I am making an app with electron and wants to save some data in a sqlite database using drizzle orm but i want the sqlite database file to be automatically created with the schema the first time the app launches
6 Replies
I can do one thing, get the SQL query from
table.getSQL().toQuery()
and execute that query in better-sqlite3
You can use
migrate
function from drizzle-orm
https://orm.drizzle.team/kit-docs/overview#running-migrationsDrizzle Kit – DrizzleORM
Drizzle ORM | %s
to generate those sql migrations you can use
drizzle-kit generate:sqlite
oh thanks!