Repository navigation
Conversation
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | 87f83dc | Aug 18 2026, 02:32 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 87f83dc | Aug 18 2026, 02:25 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 2f6911f | Aug 13 2026, 11:29 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 87f83dc | Aug 18 2026, 02:32 PM |
There was a problem hiding this comment.
Pull request overview
This PR updates the documentation set to describe “deployment-managed” EmDash core database migrations (build emits a manifest; CI/operator applies it; runtime can enforce with check/manual) across configuration, CLI, and deployment guides, and adds a clarifying note in AGENTS.md.
Changes:
- Documents the new
migrationsruntime policy (auto/check/manual) and related env override in the configuration reference. - Adds/expands CLI and deployment guidance for
emdash migrate, including D1/Hyperdrive specifics and an end-to-end “build → migrate → deploy → check” flow. - Introduces a dedicated “Manage Core Database Migrations” deployment doc and wires it into the docs sidebar.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/src/content/docs/reference/configuration.mdx | Documents the new migrations config block and updates DB adapter option tables. |
| docs/src/content/docs/reference/cli.mdx | Adds emdash migrate reference (options, exit codes) and clarifies JSON output behavior. |
| docs/src/content/docs/deployment/schema-evolution.mdx | Updates schema-evolution guidance to distinguish core migrations from content model changes. |
| docs/src/content/docs/deployment/database.mdx | Expands database/migration docs to cover manifest-driven deployment migrations and new adapter migration credential knobs. |
| docs/src/content/docs/deployment/core-migrations.mdx | New comprehensive guide for deployment-managed core migrations across adapters (incl. D1 serialization and Hyperdrive origin connectivity). |
| docs/src/content/docs/deployment/cloudflare.mdx | Updates Cloudflare deployment steps to provision resources explicitly and run migrations pre-deploy. |
| docs/astro.config.mjs | Adds the new core-migrations page to the deployment sidebar navigation. |
| AGENTS.md | Minor workflow wording clarification and additional migration guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
This PR documents the deployment-managed core migrations feature introduced in the preceding chain of PRs, plus a small AGENTS.md workflow clarification. The approach is sound: the feature code already landed, and these docs cover the CLI, adapter config, runtime auto/check/manual modes, D1/Hyperdrive specifics, and CI serialization. I read the changed docs against the implementation in packages/core/src/cli/commands/migrate.ts, packages/core/src/database/migrations/policy.ts, the database adapter descriptors, and the Cloudflare D1/Hyperdrive migration executors. The docs are largely accurate.
I found three real issues to fix before merging:
pnpm deployis used as a deployment step, butdeployis a built-in pnpm command, notpnpm run deploy. The preceding step already runspnpm build, so even if adeployscript existed it would rebuild redundantly. The examples should usepnpm exec wrangler deploy.- The D1 setup
<Aside>indatabase.mdxstill claims Wrangler provisions the D1 database automatically on first deploy, which directly contradicts the new guidance that D1 must be provisioned separately. - The exit-codes link in
core-migrations.mdxpoints to#exit-codes, which resolves to the generic CLI exit-codes section rather than theemdash migrate-specific table.
The AGENTS.md migration guidance and the workflow clarification are good additions.
Findings
-
[needs fixing]
docs/src/content/docs/deployment/core-migrations.mdx:27This deployment step uses
pnpm deploy, butdeployis a built-in pnpm command (it deploys packages from a workspace), not a shorthand forpnpm run deploy. The previous step already ranpnpm build, so invoking adeployscript here would also rebuild redundantly. Use the explicit Wrangler command, matching the Cloudflare deployment page.pnpm exec emdash migrate --expected-target-fingerprint "$EMDASH_TARGET_FINGERPRINT" pnpm exec wrangler deploy pnpm exec emdash migrate --check -
[needs fixing]
docs/src/content/docs/deployment/core-migrations.mdx:139The workflow example also uses
pnpm deploy. Afterpnpm buildand the migration apply, the correct next step is to deploy the Worker withpnpm exec wrangler deploy; otherwise the built-in pnpmdeploycommand may run instead of the intended deploy step.- run: pnpm exec wrangler deploy -
[needs fixing]
docs/src/content/docs/deployment/database.mdx:70This D1 setup aside still claims Wrangler provisions the D1 database automatically on first deploy. That contradicts the new deployment-managed migration guidance added on this page and in the Cloudflare/core-migrations pages, which state that D1 databases must be provisioned separately before migrations are applied. Update the aside to stop implying auto-provisioning.
<Aside> EmDash runs core migrations automatically by default on the first request after deployment, or a deployment can apply them from the build manifest before traffic. You must provision the D1 database separately; see [Manage Core Database Migrations](/deployment/core-migrations/). </Aside> -
[suggestion]
docs/src/content/docs/deployment/core-migrations.mdx:33The anchor
#exit-codesresolves to the generic CLI exit-codes section near the bottom of the page, not theemdash migrate-specific exit-codes table. Link to the migrate command section instead, or add an explicit ID to the migrate exit-codes heading incli.mdxand link to it.The [CLI reference](/reference/cli/#emdash-migrate) distinguishes pending, unknown, confirmation, interruption, and operational exit codes.
2e03edc to
2d5ca8f
Compare
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-verification
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
2d5ca8f to
1d522eb
Compare
|
Addressed all EmDashBot documentation findings in 1d522eb: both deployment examples now use pnpm exec wrangler deploy, the D1 aside requires explicit provisioning, and the exit-code link targets the emdash migrate section. The two Copilot wording findings are fixed in the same commit. The docs build passes. |
There was a problem hiding this comment.
This is the right follow-up: it documents the already-landed deployment-managed core migrations feature across database, Cloudflare, CLI, configuration, and schema-evolution guides, plus the requested AGENTS.md workflow clarification. The docs are accurate against the implementation in packages/core/src/cli/commands/migrate.ts and packages/core/src/database/migrations/policy.ts.
The three issues from the previous review are fixed:
docs/src/content/docs/deployment/core-migrations.mdxnow usespnpm exec wrangler deployin both the inline example and the GitHub Actions workflow.docs/src/content/docs/deployment/database.mdxno longer claims D1 is auto-provisioned on deploy; it now points readers to the core-migrations guide.- The exit-codes link in
core-migrations.mdxnow points to/reference/cli/#emdash-migrate, which resolves to theemdash migratecommand section added incli.mdx. (Starlight auto-generates the#emdash-migrateanchor from the### emdash migrateheading.)
I found one new real issue and one wording suggestion:
Findings
-
[needs fixing]
docs/src/content/docs/deployment/cloudflare.mdx:336The AI Search setup steps still tell users to run
pnpm deployto deploy the site. As noted in the previous review,deployis a built-in pnpm command (it deploys packages from a workspace), not a shorthand for a deploy script. Readers following this step will not deploy the Worker. Use the explicit Wrangler command, consistent with the migration-managed deployment example earlier on the same page.pnpm exec wrangler deploy -
[suggestion]
AGENTS.md:157The new migration guidance has a broken parallel structure: "Test representative upgrades from existing data, retry after partial completion, every supported dialect, and realistically large data shapes." The third and fourth list items lack a verb. Add one so the sentence scans correctly.
Test representative upgrades from existing data, retry after partial completion, test every supported dialect, and test with realistically large data shapes.
1d522eb to
ab9fcfa
Compare
ab9fcfa to
70ef0bf
Compare
|
Addressed both findings from the latest EmDashBot review in ab9fcfa (rebased into the current stack head): the remaining AI Search deployment example now uses |
There was a problem hiding this comment.
This is the right follow-up PR: it documents the already-landed deployment-managed core migrations feature across database, Cloudflare, CLI, configuration, and schema-evolution guides, plus the requested AGENTS.md workflow clarification. The docs accurately reflect the implementation I traced in packages/core/src/cli/commands/migrate.ts, packages/core/src/database/migrations/policy.ts, the adapter migration executors, and the runtime middleware.
I re-verified the issues raised in the prior review and the two newer findings from that round:
- ✅
docs/src/content/docs/deployment/core-migrations.mdxusespnpm exec wrangler deployin both the inline example and the GitHub Actions workflow. - ✅
docs/src/content/docs/deployment/database.mdxno longer claims D1 is auto-provisioned on deploy and now points readers to the core-migrations guide. - ✅ The exit-codes link in
core-migrations.mdxresolves to/reference/cli/#emdash-migrate, matching the### emdash migrateheading added incli.mdx. - ✅
docs/src/content/docs/deployment/cloudflare.mdxnow usespnpm exec wrangler deployfor the AI Search deploy step instead of the incorrectpnpm deploy. - ✅ The migration guidance in
AGENTS.mdnow has a correct parallel structure.
I also spot-checked the documented CLI options, exit codes, manifest shape, adapter defaults (migrationAuthTokenEnv, migrationConnectionStringEnv, D1/Hyperdrive behavior), runtime modes, and 503 handling against the source, and found no discrepancies. All changed hunks are documentation-only; there are no new logged-out queries, code paths, or AGENTS.md convention violations to flag.
No further findings.
70ef0bf to
55231f8
Compare
There was a problem hiding this comment.
This is the right follow-up documentation PR: it documents the already-landed deployment-managed core migrations feature across database, Cloudflare, CLI, configuration, and schema-evolution guides, plus the requested AGENTS.md workflow clarification. The approach is consistent with EmDash's architecture and the prior approved Discussion.
I re-verified the issues raised in the prior review and spot-checked the implementation against the source code:
docs/src/content/docs/deployment/core-migrations.mdxusespnpm exec wrangler deployin the inline deployment example and the GitHub Actions workflow.docs/src/content/docs/deployment/database.mdxno longer claims D1 is auto-provisioned on deploy and now points readers to the core-migrations guide.- The exit-codes link in
core-migrations.mdxresolves to/reference/cli/#emdash-migrate, matching the### emdash migrateheading added incli.mdx. docs/src/content/docs/deployment/cloudflare.mdxnow usespnpm exec wrangler deployfor the AI Search deploy step.- The migration guidance added to
AGENTS.mdhas a correct parallel structure.
I also re-traced the documented CLI options, exit codes, manifest shape, adapter defaults (migrationAuthTokenEnv, migrationConnectionStringEnv, D1/Hyperdrive behavior), runtime modes (auto/check/manual), EMDASH_MIGRATIONS_MODE override, and 503 handling against packages/core/src/cli/commands/migrate.ts, packages/core/src/database/migrations/policy.ts, packages/core/src/astro/middleware.ts, the adapter migration executors, and the runtime middleware. All changed hunks are documentation-only; there are no new logged-out queries, code paths, or AGENTS.md convention violations to flag.
No further findings.
55231f8 to
2f6911f
Compare
2f6911f to
7178eb5
Compare
7178eb5 to
87f83dc
Compare
What does this PR do?
Documents deployment-managed core migrations across database, Cloudflare, CLI, configuration, and schema-evolution guides. It also includes the requested unrelated
AGENTS.mdworkflow clarification.Closes #2276
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.The typecheck and changeset items are not applicable to this documentation-only layer. Quick lint, targeted formatting, and the docs build pass. The i18n item is not applicable because this does not change the admin UI.
AI-generated code disclosure
Screenshots / test output
Non-visual documentation change. The documentation site builds successfully.
Try this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
codex/issue-2276-migrations-docs. Updated automatically when the playground redeploys.