Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/require-sqlite-classes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"partyserver": minor
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lemme see if I can workaround this

---

Uses `ctx.storage.kv` (synchronous KV) internally to persist `Server.name` across cold starts. This requires SQLite-backed Durable Objects, so you must use `new_sqlite_classes` instead of `new_classes` in your wrangler configuration's `migrations` field.

**Breaking:** If your Durable Object namespace still uses `new_classes`, you will see the following runtime error:

> The storage.kv (synchronous KV) API is only available for SQLite-backed Durable Objects, but this object's namespace is not declared to use SQLite. You can use the older, asynchronous interface via methods of `storage` itself (e.g. `storage.get()`). Alternatively, to enable SQLite, change `new_classes` to `new_sqlite_classes` within the 'migrations' field in your wrangler.jsonc or wrangler.toml file.

**Note:** This migration cannot be reversed once deployed to production.
2 changes: 1 addition & 1 deletion fixtures/globe/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"migrations": [
{
"tag": "v1", // Should be unique for each entry
"new_classes": ["Globe"]
"new_sqlite_classes": ["Globe"]
}
]
}
2 changes: 1 addition & 1 deletion fixtures/hono/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"migrations": [
{
"tag": "v1", // Should be unique for each entry
"new_classes": ["Chat"]
"new_sqlite_classes": ["Chat"]
}
]
}
2 changes: 1 addition & 1 deletion fixtures/lexical-yjs/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"migrations": [
{
"tag": "v1",
"new_classes": ["LexicalDocument"]
"new_sqlite_classes": ["LexicalDocument"]
}
]
}
2 changes: 1 addition & 1 deletion fixtures/monaco-yjs/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"migrations": [
{
"tag": "v1",
"new_classes": ["MonacoServer"]
"new_sqlite_classes": ["MonacoServer"]
}
]
}
2 changes: 1 addition & 1 deletion fixtures/node/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"migrations": [
{
"tag": "v1",
"new_classes": ["MyServer"]
"new_sqlite_classes": ["MyServer"]
}
]
}
2 changes: 1 addition & 1 deletion fixtures/pubsub/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"migrations": [
{
"tag": "v1",
"new_classes": ["PubSubServer"]
"new_sqlite_classes": ["PubSubServer"]
}
]
}
2 changes: 1 addition & 1 deletion fixtures/rpc-sanity/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"migrations": [
{
"tag": "v1",
"new_classes": ["MyServer"]
"new_sqlite_classes": ["MyServer"]
}
]
}
2 changes: 1 addition & 1 deletion fixtures/tldraw/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"migrations": [
{
"tag": "v1", // Should be unique for each entry
"new_classes": ["Tldraw"]
"new_sqlite_classes": ["Tldraw"]
}
]
}
4 changes: 3 additions & 1 deletion packages/hono-party/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ const socket = usePartySocket({
{ "name": "Document", "class_name": "Document" }
]
},
"migrations": [{ "tag": "v1", "new_classes": ["Chat", "Game", "Document"] }]
"migrations": [
{ "tag": "v1", "new_sqlite_classes": ["Chat", "Game", "Document"] }
]
}
```

Expand Down
2 changes: 1 addition & 1 deletion packages/partyserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ And configure your `wrangler.jsonc`:
"migrations": [
{
"tag": "v1", // Should be unique for each entry
"new_classes": ["MyServer"]
"new_sqlite_classes": ["MyServer"]
}
]
}
Expand Down
Loading
Loading