is d1 replication relatively stable now? i've put off trying it after a few had some issues original
is d1 replication relatively stable now? i've put off trying it after a few had some issues originally
packages/db where a wrangler.jsonc with d1 bindings is present(without app name), and a apps/server with another wrangler.jsonc with d1 bindings and app name. packages/api(orpc) which is attached to the server app. In my web app, i was trying to perform some queries(todos and authentication with better-auth) but was getting internal error code with some logs saying the table could not be found which was weird. after days of debugging, i just found out that a local db file also being created inside apps/server/.wrangler. so wrangler was using the local db inside the server directory instead of the one in db.packages/db instead?--persist-to flag like this "dev": "wrangler dev --persist-to ../../packages/db/.wrangler/state"
PRAGMA defer_foreign_keys = true. I could then confirm that all data was identical between X and X_old, then drop X_old. But now this doesn't work and I get the error FOREIGN KEY constraint failed: SQLITE_CONSTRAINT [code: 7500]. I see that D1 now updates the references on Y and Z so that they point at X_old instead of the newly created version of X. If I do the same copy/rename trick on Y and Z, then my new X ends up referencing Y_old and Z_old. I can't figure out how to get a clean reset with the new X, Y, and Z pointing to each other and nothing pointing to the old tables so that they can be deleted. Is there a way to disable the auto-renaming of foreign key constraints so that the previous behavior would work?meta.served_by_primary = true). The Cloudflare D1 dashboard says ENAM is the only region. Is there a minimum amount of time, or number of queries, before replicas are created? Have I missed a step?DB_REPLICATED.withSession("first-unconstrained"))I'm querying with DB_REPLICATED.withSession("first-unconstrained")Just to confirm, you are doing reads only right?


packages/dbpackages/dbwrangler.jsoncwrangler.jsoncapps/serverpackages/apiapps/server/.wrangler--persist-to"dev": "wrangler dev --persist-to ../../packages/db/.wrangler/state"PRAGMA defer_foreign_keys = trueFOREIGN KEY constraint failed: SQLITE_CONSTRAINT [code: 7500]meta.served_by_primaryDB_REPLICATED.withSession("first-unconstrained")