Shared database library using Prisma as ORM
We are using PlanetScale as an easy-to-setup MySQL platform.
- Get added/access to our PlanetScale organization.
- Install the PlanetScale CLI
- Make sure
DATABASE_URL
is set in.env
- Authenticate the CLI with the following command:
pscale auth login
-
Connect to the
development
branch:pscale connect xd development --port 3309
-
Make changes in
prisma/schema.prisma
file and update the schema in PlanetScale:yarn db:push
-
Open a deploy request for the
development
branch, so that you can deploy these changes tomain
.pscale deploy-request create xd development
-
Review and complete the deploy request.