Running through the setup for Northwind Traders as outlined in https://github.com/cloudflare/templates/tree/main/worker-d1.
wrangler d1 create northwind-demo
works fine and I see the DB in the dashboard, however upon running
wrangler d1 execute northwind-demo --file ./data/Northwind.Sqlite3.create.sql
I get the error message
ERROR 9009: SQL prepare error: no such table: main.Territories [code: 7500]
Territories table is created on line
3517 though I do see there is a reference to this table in the
EmployeeTerritories table on line
227. Given that
PRAGMA foreign_keys=off; is set on line 13, that missing reference shouldn’t matter (from what I remember of using SQLite.)
Any insight as to getting this demo working appreciated.