``` 14:28:29.976 > db:migrate-remote 14:28:29.976 > npx wrangler d1 migrations apply D1_BINDI
Anyone know why this might fail?
I have in
package.json scripts:I have in my env:
CLOUDFLARE_API_TOKEN where I added a d1 read/write token14:28:29.976 > db:migrate-remote
14:28:29.976 > npx wrangler d1 migrations apply D1_BINDING --remote
14:28:29.976
14:28:31.315 ⛅️ wrangler 3.52.0
14:28:31.316 -------------------
14:28:32.030 Failed: Error while executing user command. Exited with error code: 1
14:28:32.040 Failed: build command exited with code: 1
14:28:33.462 Failed: error occurred while running build commandpackage.json scripts"postbuild": "npm run db:migrate-remote",
"db:migrate-remote": "npx wrangler d1 migrations apply D1_BINDING --remote",CLOUDFLARE_API_TOKENd1D1_BINDINGWRANGLER_LOG=debug and hopefully you'll see what's going wrong WRANGLER_LOG=debug the other error was just too vague

env.DB.prepare(...) is just an object, it has almost nothing to do with SQLite. It is sent to your database, which makes a prepared statement with the SQL text and binds it with your parameters.prepare both times, of course)
17:09:38.403 > db:migrate-remote
17:09:38.403 > npx wrangler d1 migrations apply db-prod --remote
17:09:38.404
17:09:39.845 ⛅️ wrangler 3.52.0
17:09:39.845 -------------------
17:09:41.463 Failed: Error while executing user command. Exited with error code: 1
17:09:41.473 Failed: build command exited with code: 1
17:09:42.674 Failed: error occurred while running build command17:21:21.937 🪵 Writing logs to "/opt/buildhome/.config/.wrangler/logs/wrangler-2024-04-26_15-21-21_813.log"
17:21:21.938 Failed to load .env file ".env": Error: ENOENT: no such file or directory, open '.env'
17:21:21.938 at Object.openSync (node:fs:603:3)
17:21:21.938 at Object.readFileSync D1_BINDING