Replies: 3 comments 8 replies
-
I don't think it's currently possible. The fact no one has responded or faced this issue is people are not using D1. Drizzle doesn't provide a |
Beta Was this translation helpful? Give feedback.
-
You can do this with the
Then a table will be created with the migration history so that you only run the migrations as needed. See more details in the cloudflare docs |
Beta Was this translation helpful? Give feedback.
-
Is there also a way for those migrations scripts to be executed automatically when for example deploying my next-on-pages app (which specifies the D1 binding in the wrangler.toml file)? |
Beta Was this translation helpful? Give feedback.
-
I've got a project set up that uses D1 in production and better-sqlite3 locally for development. Everything works fine in development, and I can access the D1 database in production fine.
However, I'm not sure how to actually get my Drizzle schema into D1. Is it possible to write a "migrate_live" script that connects directly from my local machine to D1 sqlite, or is there some other approach I'm missing?
Beta Was this translation helpful? Give feedback.
All reactions