If I have a worker and a pages app operating on the same d1 database will it result in data corrupti
If I have a worker and a pages app operating on the same d1 database will it result in data corruption?
Internal error in D1 storage caused object to be reset. errors

offers asynchronous read replication definitely do imply that, and might need tightening up a bit. Confusion around this comes up a lot.
Internal error in D1 storage caused object to be reset. errorsD1_ERROR: Internal error in D1 storage caused object to be reset.. They are happening on all of my queries and causing lots of 500 errors
bun drizzle-kit migrate i receive the following error:RAISEInternal error in D1 storage caused object to be reset.Internal error in D1 storage caused object to be reset.Internal error in D1 storage caused object to be reset.offers asynchronous read replicationD1_ERROR: Internal error in D1 storage caused object to be reset.bun drizzle-kit migrateRAISEInternal error in D1 storage caused object to be reset$ bun db:migrate
$ drizzle-kit migrate
No config path provided, using default 'drizzle.config.ts'
Reading config file 'G:\GitHub\BuzzTrip\apps\web\drizzle.config.ts'
Using G:\GitHub\BuzzTrip\apps\web\.wrangler\state\v3\d1\miniflare-D1DatabaseObject\097dd93c38860e13c35b3676a4f13f4950f08ed9c239ec99db5716131b0e2718.sqlite
[⣷] applying migrations...Error: Can't find meta/_journal.json file
at readMigrationFiles (G:\GitHub\BuzzTrip\node_modules\src\migrator.ts:41:9)
at migrate (G:\GitHub\BuzzTrip\node_modules\src\libsql\migrator.ts:10:21)
at migrateFn (G:\GitHub\BuzzTrip\node_modules\drizzle-kit\bin.cjs:72211:18)
at Object.handler (G:\GitHub\BuzzTrip\node_modules\drizzle-kit\bin.cjs:83593:11)
at async run (G:\GitHub\BuzzTrip\node_modules\drizzle-kit\bin.cjs:82064:7)
error: script "db:migrate" exited with code 1import { defineConfig } from "drizzle-kit";
import fs from "node:fs";
import path from "node:path";
function getLocalD1DB() {
try {
const basePath = path.resolve(".wrangler");
const dbFile = fs
.readdirSync(basePath, { encoding: "utf-8", recursive: true })
.find((f) => f.endsWith(".sqlite"));
if (!dbFile) {
throw new Error(`.sqlite file not found in ${basePath}`);
}
const url = path.resolve(basePath, dbFile);
console.log(`Using ${url}`);
return `file:${url}`;
} catch (err) {
console.log(`Error ${err}`);
}
}
export default defineConfig({
dialect: "sqlite",
schema: "./app/server/db/schema.ts",
out: "./drizzle",
...(process.env.NODE_ENV === "production"
? {
driver: "d1-http",
dbCredentials: {
accountId: process.env.CLOUDFLARE_D1_ACCOUNT_ID,
databaseId: process.env.DATABASE,
token: process.env.CLOUDFLARE_D1_API_TOKEN,
},
}
: {
dbCredentials: {
url: getLocalD1DB(),
},
}),
});#:schema node_modules/wrangler/config-schema.json
name = "buzztrip"
compatibility_date = "2024-08-21"
compatibility_flags = ["nodejs_compat"]
pages_build_output_dir = ".vercel/output/static"
[[d1_databases]]
binding = "BUZZTRIP_DATABASE"
database_name = "BuzzTrip-db"
database_id = "<database-id>"
migrations_dir = "drizzle/migrations"[[env.dev.d1_databases]]
binding = "DB"
database_name = "d-dev"
database_id = "67d41931-140c-418b-xxxx-xxxxx"