Skip to content

Latest commit

 

History

History

shared-edge

How to update database.ts

  1. Spin up a mysql docker container
docker run -p 3306:3306 --name mysql2 -e MYSQL_ROOT_PASSWORD=super_secure_password -e MYSQL_ROOT_HOST=% -d mysql/mysql-server:latest
  1. In lrpc, run npx prisma db push

  2. Copy the DDL from PlanetScale to the docker container's mysql (use DataGrip or whatever). Use schema_name as the schema.

  3. In shared-edge, run

npx kysely-codegen --out-file './src/database.ts' --url "mysql://root:super_secure_password@localhost/schema_name"