Create a D1 database and grab its binding
d1 & hyperdrive
// what it does
Provisions a new serverless SQLite database and prints the [[d1_databases]] binding block — binding name plus database_id — for your wrangler config. Run this once per database; every other d1 command references it by binding or name afterward.
// shell
$ wrangler d1 create <name>// gotcha
It does NOT write the binding into your config for you. Copy the printed database_id into wrangler.toml/jsonc yourself, or the Worker won't find the DB at runtime.