- Head ove to
Settings
Tab - Activate
Automatically copy migration data
- Pick
Prisma
as Migration Framework
pscale branch create YOUR_DB_NAME initial-setup
pscale branch create YOUR_DB_NAME shadow
# Terminal 1
pscale connect YOUR_DB_NAME initial-setup --port 3309
# Terminal 2
pscale connect YOUR_DB_NAME shadow --port 3310
# .env
DATABASE_URL="mysql://root@127.0.0.1:3309/YOUR_DB_NAME"
SHADOW_DATABASE_URL="mysql://root@127.0.0.1:3310/YOUR_DB_NAME"
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
referentialIntegrity = "prisma"
}
generator client {
provider = "prisma-client-js"
previewFeatures = ["referentialIntegrity"]
}
npx prisma migrate dev --name init
pscale deploy-request create YOUR_DB_NAME initial-setup