Files
t3code/docs/operations
Julius MarmingeandClaude Fable 5 7d4b7d42b8 feat(relay): cut the relay database over from PlanetScale Postgres to Vitess
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]>
2026-08-04 01:07:19 +02:00
..