dcloud deploy host-database-branches migrateRun a deployment's migrations on the branch and report what they did
The deployment names its migrate command in its bundle (`"migrate": "ews/migrate.mjs"` in .next/ews-outputs.json). The pool host reads the branch’s tables, columns, indexes, constraints and rows, runs `node <script>` from the deployment in a sandbox like the app’s with DATABASE_URL at the branch (at most 10 minutes), reads them again and answers. Read the result with get: migration.summary says it in one line ("2 columns added, the 42 existing rows stay"), migration.diff in full.
Synopsis
dcloud deploy host-database-branches migrate branchId --deployment-id deploymentIdArguments
<branchId>Requiredstring
Also accepted as
--branch-id. Constraints: uuid
Flags
--deployment-idRequiredstring
The deployment whose migrate command runs on the branch: one of the app’s live deployments, usually the preview of the version to publish
Example
dcloud deploy host-database-branches migrate branchId --deployment-id exampleGenerated from the API description, the same one the API checks requests against and the CLI is built from.