You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
polish: Give a copy-paste config when [migrations] are missing (#1152)
This gives a slightly better message when migrations are missing for declared durable objcts. Specifically, it gives a copy-pastable section to add to wrangler.toml, and doesn't show the warning at all for invalid class names anymore.
Partially makes #1076 better.
polish: Give a copy-paste config when `[migrations]` are missing
6
+
7
+
This gives a slightly better message when migrations are missing for declared durable objcts. Specifically, it gives a copy-pastable section to add to wrangler.toml, and doesn't show the warning at all for invalid class names anymore.
8
+
9
+
Partially makes https://github.com/cloudflare/wrangler2/issues/1076 better.
- \\"unsafe\\" fields are experimental and may change or break at any time.
680
680
- \\"services\\" fields are experimental and may change or break at any time.
681
-
- In wrangler.toml, you have configured [durable_objects] exported by this Worker (CLASS1), but no [migrations] for them. This may not work as expected until you add a [migrations] section to your wrangler.toml. Refer to https://developers.cloudflare.com/workers/learning/using-durable-objects/#durable-object-migrations-in-wranglertoml for more details."
681
+
- In wrangler.toml, you have configured [durable_objects] exported by this Worker (CLASS1), but no [migrations] for them. This may not work as expected until you add a [migrations] section to your wrangler.toml. Add this configuration to your wrangler.toml:
682
+
683
+
\`\`\`
684
+
[[migrations]]
685
+
tag = \\"v1\\" # Should be unique for each entry
686
+
new_classes = [\\"CLASS1\\"]
687
+
\`\`\`
688
+
689
+
Refer to https://developers.cloudflare.com/workers/learning/using-durable-objects/#durable-object-migrations-in-wranglertoml for more details."
- In wrangler.toml, you have configured [durable_objects] exported by this Worker ((unnamed), (unnamed), 1666, SomeClass, 1883), but no [migrations] for them. This may not work as expected until you add a [migrations] section to your wrangler.toml. Refer to https://developers.cloudflare.com/workers/learning/using-durable-objects/#durable-object-migrations-in-wranglertoml for more details."
- In wrangler.toml, you have configured [durable_objects] exported by this Worker ((unnamed), (unnamed), 1666), but no [migrations] for them. This may not work as expected until you add a [migrations] section to your wrangler.toml. Refer to https://developers.cloudflare.com/workers/learning/using-durable-objects/#durable-object-migrations-in-wranglertoml for more details."
`In wrangler.toml, you have configured [durable_objects] exported by this Worker (${durableObjectClassnames.join(
460
468
", "
461
-
)}), but no [migrations] for them. This may not work as expected until you add a [migrations] section to your wrangler.toml. Refer to https://developers.cloudflare.com/workers/learning/using-durable-objects/#durable-object-migrations-in-wranglertoml for more details.`
462
-
);
469
+
)}), but no [migrations] for them. This may not work as expected until you add a [migrations] section to your wrangler.toml. Add this configuration to your wrangler.toml:
470
+
471
+
\`\`\`
472
+
[[migrations]]
473
+
tag = "v1" # Should be unique for each entry
474
+
new_classes = [${durableObjectClassnames
475
+
.map((name)=>`"${name}"`)
476
+
.join(", ")}]
477
+
\`\`\`
478
+
479
+
Refer to https://developers.cloudflare.com/workers/learning/using-durable-objects/#durable-object-migrations-in-wranglertoml for more details.`
0 commit comments