From db71bf38cf0b104f5005b30d3beeaa7ba78cc540 Mon Sep 17 00:00:00 2001 From: James Opstad <13586373+jamesopstad@users.noreply.github.com> Date: Thu, 22 Jan 2026 11:52:35 +0000 Subject: [PATCH 1/3] Remove custom rules --- src/content/docs/connect-cloudflare-do.mdx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/content/docs/connect-cloudflare-do.mdx b/src/content/docs/connect-cloudflare-do.mdx index c58c66e67..ec6b04426 100644 --- a/src/content/docs/connect-cloudflare-do.mdx +++ b/src/content/docs/connect-cloudflare-do.mdx @@ -47,12 +47,6 @@ class_name = "MyDurableObject" [[migrations]] tag = "v1" new_sqlite_classes = ["MyDurableObject"] - -# We need rules so we can import migrations in the next steps -[[rules]] -type = "Text" -globs = ["**/*.sql"] -fallthrough = true ``` Make your first Durable Objects SQLite query: From 1cf0a577cb89baedc6a1fda966be6559cea24382 Mon Sep 17 00:00:00 2001 From: James Opstad <13586373+jamesopstad@users.noreply.github.com> Date: Thu, 22 Jan 2026 12:08:26 +0000 Subject: [PATCH 2/3] Convert wrangler.toml example to wrangler.jsonc --- src/content/docs/connect-cloudflare-do.mdx | 48 +++++++++++++--------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/src/content/docs/connect-cloudflare-do.mdx b/src/content/docs/connect-cloudflare-do.mdx index ec6b04426..e2d91aa9b 100644 --- a/src/content/docs/connect-cloudflare-do.mdx +++ b/src/content/docs/connect-cloudflare-do.mdx @@ -27,26 +27,34 @@ drizzle-orm #### Step 2 - Initialize the driver and make a query -You would need to have a `wrangler.toml` file for Durable Objects database and will look something like this: -```toml {16-18,21-24} -#:schema node_modules/wrangler/config-schema.json -name = "sqlite-durable-objects" -main = "src/index.ts" -compatibility_date = "2024-11-12" -compatibility_flags = [ "nodejs_compat" ] - -# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model. -# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps. -# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects -[[durable_objects.bindings]] -name = "MY_DURABLE_OBJECT" -class_name = "MyDurableObject" - -# Durable Object migrations. -# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations -[[migrations]] -tag = "v1" -new_sqlite_classes = ["MyDurableObject"] +You would need to have a `wrangler.jsonc` file for Durable Objects database and will look something like this: +```jsonc +{ + "$schema": "node_modules/wrangler/config-schema.json", + "name": "sqlite-durable-objects", + "main": "./src/index.ts", + "compatibility_date": "2024-11-12", + "compatibility_flags": ["nodejs_compat"], + "durable_objects": { + // Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model. + // Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps. + // Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects + "bindings": [ + { + "name": "MY_DURABLE_OBJECT", + "class_name": "MyDurableObject" + } + ] + }, + // Durable Object migrations. + // Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations + "migrations": [ + { + "tag": "v1", + "new_sqlite_classes": ["MyDurableObject"] + } + ] +} ``` Make your first Durable Objects SQLite query: From 1a369b1cb616e4eae3d974d14440d11553926678 Mon Sep 17 00:00:00 2001 From: James Opstad <13586373+jamesopstad@users.noreply.github.com> Date: Thu, 22 Jan 2026 12:09:42 +0000 Subject: [PATCH 3/3] Remove reference types --- src/content/docs/connect-cloudflare-do.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/content/docs/connect-cloudflare-do.mdx b/src/content/docs/connect-cloudflare-do.mdx index e2d91aa9b..f55675fa4 100644 --- a/src/content/docs/connect-cloudflare-do.mdx +++ b/src/content/docs/connect-cloudflare-do.mdx @@ -59,7 +59,6 @@ You would need to have a `wrangler.jsonc` file for Durable Objects database and Make your first Durable Objects SQLite query: ```typescript copy -/// import { drizzle, DrizzleSqliteDODatabase } from 'drizzle-orm/durable-sqlite'; import { DurableObject } from 'cloudflare:workers' import { migrate } from 'drizzle-orm/durable-sqlite/migrator';