@syncular/server-workers 0.16.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -15
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -101,21 +101,23 @@ See `wrangler.toml.example` for the binding config.
|
|
|
101
101
|
|
|
102
102
|
## Schema migration (D1)
|
|
103
103
|
|
|
104
|
-
`
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
The
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
104
|
+
Run `storage.migrateSchema(compileSchema(schema))` from an authenticated
|
|
105
|
+
maintenance handler before admitting sync traffic. The method creates core
|
|
106
|
+
and application tables and rewrites stored rows. It returns
|
|
107
|
+
`{ complete, statementsExecuted }`; call it again in a new Worker invocation
|
|
108
|
+
when `complete` is false.
|
|
109
|
+
|
|
110
|
+
Each call defaults to 50 statements. Set `{ maxStatements: 40 }` to leave
|
|
111
|
+
room for other queries, or choose another integer from 10 through 1000 for
|
|
112
|
+
your D1 plan. Run at most one call per invocation. Progress and row updates
|
|
113
|
+
commit together, so interrupted requests can resume with the same schema.
|
|
114
|
+
The storage rejects row reads and transaction commits during migration.
|
|
115
|
+
|
|
116
|
+
`ensureSchema` performs one step and throws
|
|
117
|
+
`sync.storage.schema_migration_pending` when another invocation is needed.
|
|
118
|
+
Drain older Syncular deployments before starting an upgrade: they do not
|
|
119
|
+
check the migration state. See [the migration guide](https://syncular.dev/server-workers/#schema-migration)
|
|
120
|
+
for a maintenance handler and the remaining D1 limits.
|
|
119
121
|
|
|
120
122
|
## Storage: D1 (`D1ServerStorage`)
|
|
121
123
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/server-workers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Cloudflare Workers adapter for the Syncular sync server",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Benjamin Kniffler",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"!dist/**/*.test.d.ts"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@syncular/server": "0.
|
|
49
|
-
"@syncular/server-hono": "0.
|
|
48
|
+
"@syncular/server": "0.17.0",
|
|
49
|
+
"@syncular/server-hono": "0.17.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@syncular/core": "0.
|
|
52
|
+
"@syncular/core": "0.17.0"
|
|
53
53
|
}
|
|
54
54
|
}
|