alchemy-run/alchemy#1063 shipped SQL.MySQL + Drizzle.MySQL upstream, but
the latest published release (2.0.0-beta.67, cut 2026-08-01) predates the
merge. Vendor the implementation verbatim (URL parsing into discrete
fields since mysql2's URI path ignores poolConfig, workerd-detected
disableEval + disablePreparedStatements defaults) with the upstream call
shape, so adopting the next alchemy release is delete-the-file plus a
one-line import swap in worker.ts.
Co-Authored-By: Claude Fable 5 <[email protected]>
alchemy's Drizzle.Schema auto-generation is Postgres-only (drizzle-kit has
no programmatic mysql API), so follow the documented MySQL pattern: a
drizzle.config.ts + `drizzle-kit generate`, with migrations checked in and
the database/branch resources pointed at the static migrations/mysql dir.
This also makes RelayMysqlDatabase's props identical to the provisioning
PR, so the cutover deploy no-ops on the database itself.
Co-Authored-By: Claude Fable 5 <[email protected]>
Ports the relay to PlanetScale's Vitess (MySQL) product:
- schema on drizzle mysql-core; indexed text columns become varchar(255)
(InnoDB cannot uniquely index unbounded TEXT)
- Vitess stack resources (MySQLDatabase/MySQLBranch/MySQLPassword) with
Hyperdrive fed from the runtime password's mysql origin; the retired
Postgres database + role stay in the prod stack until the cutover has
soaked, so rollback is a revert of this PR
- local Drizzle MySql runtime helper on @effect/sql-mysql2 +
drizzle-orm/effect-mysql2 (discrete Hyperdrive fields so mysql2 gets
disableEval for Workers; prepared statements off for Hyperdrive)
- MySQL has no RETURNING / ON CONFLICT: repositories move to
INSERT IGNORE / ON DUPLICATE KEY UPDATE with affectedRows checks,
excluded.* becomes values(*), jsonb ->> 'phase' becomes JSON path
- checked-in mysql baseline migration + operational runbook for the
DMS data migration (docs/operations/relay-postgres-to-vitess-migration.md)
Stacked on relay/provision-vitess-db, which creates the empty database
ahead of this cutover.
Co-Authored-By: Claude Fable 5 <[email protected]>
Phase 1 of the relay Postgres -> Vitess migration: create the
t3coderelay-vitess MySQL database in the prod stack and apply the
checked-in baseline schema via the alchemy migration runner, while the
worker keeps running on Postgres. This lets DMS replicate production
data into the target before the cutover PR flips Hyperdrive.
See docs/operations/relay-postgres-to-vitess-migration.md (cutover PR)
for the full runbook.
Co-Authored-By: Claude Fable 5 <[email protected]>
actions/checkout implements sparse-checkout with --filter=blob:none, so
the runner repo is a partial clone missing the .repos/ blobs. eas-cli
archives the project via `git clone --depth 1 file://<workspace>`,
which upload-pack cannot serve from a partial clone and exits 128
(#4802 broke both EAS build workflows this way).
Co-Authored-By: Claude Fable 5 <[email protected]>