I wouldn't use d1, it only has like 20% uptime
I wouldn't use d1, it only has like 20% uptime


wrangler.toml works. Is this a Workers or a Pages project?await db.exec("PRAGMA table_list") - and nothing else? Your binding appears fine. You aren't returning any results (because it's an INSERT without any RETURNING) - what do you expect to happen? It should just insert without an error.[vars] table will make it where your D1 bindings are not defined unless you changed your format to use a table for d1_databases also which is why you started to get an error when you moved it.- KV Namespaces:
....
- D1 Databases:
- MYDATABASE_DB: mydbinmydashboard (74244d9f-afa8-4ca2-ab7f-XXXXXX)
- Vars:
..... console.log("we start the new DB");
try {
console.log("we start the new DB test 1");
await env.DBNAME_DB.prepare(`insert into messages (location_id,time_stamp,status,customer_dismiss) values (?,?,?,?)`).bind(restaurant_token_used, timestamp_index, 'new', 0).run()
console.log("we start the new DB test 2");
} catch (e) {
console.log("we start the new DB test 3");
console.log({
message: e.message,
cause: e.cause.message,
});
}
console.log("we end the new DB");await db.exec("PRAGMA table_list")[vars]d1_databasesvar coolio200 = await env.MYDATABASE_DB.exec("PRAGMA table_list")
console.log("here is coolio100")
console.log("here is coolio200: " + JSON.stringify(coolio200))- KV Namespaces:
....
- D1 Databases:
- MYDATABASE_DB: mydbinmydashboard (74244d9f-afa8-4ca2-ab7f-XXXXXX)
- Vars:
.....d1_databases = [
{ binding = "name", ... }
]
[vars]
hello = "world"[vars]
hello = "world"
d1_databases = [
{ binding = "name", ... }
]