D1 migrations apply in Pages deployment?
Hi, I'm currently testing the possibilities of running a Remix project on CF Pages, using drizzle ORM for D1.
Got it running fine, except I can't figure out how to excute the
wrangler d1 migrations apply
on deployment (either production or preview).
- Attempt to do it in the build script result in failed deployment (even with a CLOUDFLARE_API_TOKEN
env var)
- Migration works fine when ran from local terminal (local or remote D1), but I think DB migrations should be handled in the CI
Thanks for any help!1 Reply
Did you ever make progress on this? Applying D1 migrations during a Pages deployment is high on my list currently.