Something the Pages team is working on improving. In the meantime (and this is not officially suppor
Something the Pages team is working on improving. In the meantime (and this is not officially supported; could break/change in the future):
- Create a
with awrangler.toml
key that maps to the same name used forpreview_database_id--d1=<BINDING>you pass towrangler pages dev- e.g. "DB" or "PROD_DB" (as appropriate)
- Execute
wrangler d1commands with the
flag against that local database to seed it / run migrations / etc - e.g.--localwrangler d1 execute db-name --file=seed.sql --local - Ensure that you pass
--d1=BINDING_NAMEto anywrangler pages devcommands so that Pages references the same local DB.

