Jarrett
DTDrizzle Team
•Created by Jarrett on 8/25/2024 in #help
Migrating a local Cloudflare D1 database
I have a Cloudflare Worker with a few environments and databases. I've figured out how to migrate my staging and prod databases via this guide: https://orm.drizzle.team/learn/guides/d1-http-with-drizzle-kit.
What I want to do now, is also run those migrations on my local database. This script allows me to access my local database, for example:
yarn run wrangler d1 execute staging_db_1 --env=dev --local --file=./drop_tables.sql
.
How can I invoke drizzle-kit commands to run against my local database? I've tried removing the driver
and dbCredentials
values from the config in drizzle.config.ts
, but I get Error Please provide required params: [x] url: undefined
. I don't konw what URL I'd be expected to use if I'm drizzle-kit migrating a local database.3 replies