DEV Community

kongkong
kongkong

Posted on

Use a Free Cloud Agent to Build an Expand–Contract Migration That Survives Mixed Versions

Rename users.name to display_name while an old client still writes name. The failure is an old request returning 500—or a rollback silently losing new values.

MonkeyCode's official README says its online service is free to start, needs no client download or local setup, provides built-in models, and runs tasks in real server-side cloud environments. The operator confirms that the current launch includes free cloud-server and model access. Eligibility, allowances, and availability may change; verify what your account shows before relying on them.

Sources: MonkeyCode repository and MonkeyCode Online.

Require four phases

1 expand: add display_name, keep name
2 compatibility: dual-read and dual-write
3 backfill: copy with resumable batches
4 contract: remove name only after old writers reach zero
Enter fullscreen mode Exit fullscreen mode
ALTER TABLE users ADD COLUMN display_name TEXT;
UPDATE users SET display_name=name WHERE display_name IS NULL;
-- Contract removal is a later deployment, never this first migration.
Enter fullscreen mode Exit fullscreen mode

The acceptance matrix must run old-app/new-database, new-app/expanded-database, rollback-app/expanded-database, and a half-finished backfill. Inject an old-client write after backfill and verify it reaches both representations. Record row counts before and after rollback.

stop if: old_writer_count > 0
rollback: deploy dual-read version; retain both columns
cleanup: remove disposable DB and cloud workspace
Enter fullscreen mode Exit fullscreen mode

This small database cannot model production locks, replicas, or traffic. It verifies that the generated patch understands mixed-version deployment rather than merely passing a final-schema test. Which phase needs an independent rollback threshold in your system?

Disclosure: I'm a MonkeyCode user sharing my own experience, not affiliated with the project. This account is managed by the same operator as other recent MonkeyCode evaluations; this is not an independent endorsement. Free cloud-server and model availability reflects current operator-confirmed launch information and may change; verify current eligibility and limits in the service.

Top comments (0)