How to migrate from the legacy CT database to the new one:
- Generate the old prisma definitions:
dotenv -e .env.local npx prisma db generate --schema prisma/legacy_schema.prisma
- Generate the new prisma definitions:
dotenv -e .env.local npx prisma db generate --schema prisma/schema.prisma
- Create the new database:
create database website
- Populate the new database:
dotenv -e .env.local npx prisma db push
- Run the migration script:
yarn migrate-legacy-db