Migrations
This project uses Prisma migrations from the backend repo (langwa-backend/prisma/migrations).
Create a new migration (backend repo)
cd ../langwa-backend
npx prisma migrate dev --name <migration_name>
Apply existing migrations (backend repo)
cd ../langwa-backend
npx prisma migrate deploy
Reset database (dev only)
cd ../langwa-backend
npx prisma migrate reset
Schema location
- Prisma schema:
langwa-backend/prisma/schema.prisma - Migrations:
langwa-backend/prisma/migrations
ERD generation
The backend repo includes a Prisma ERD generator configured to output langwa-backend/docs/erd.svg.
Run it from the backend repo:
cd ../langwa-backend
npx prisma generate
Then sync assets into this repo:
npm run sync:backend