You need to first generate prisma client code from you schema.prisma file after you install the package:
This will be done automatically when you run pnpm install:all
or pnpm install:editor-server
in the project's root directory.
npx prisma generate
or
pnpm generate
If you are running this for the first time, you will need to follow the steps below to initialize the database.
When you change the prisma schema, you need to regenerate the prisma client code and migrate the database.
# Lightdance-Editor
docker compose -f dev.docker-compose.yml up -d
# Lightdance-Editor/editor-server
pnpm migrate
# Lightdance-Editor
pnpm dev:editor-server
# Lightdance-Editor/utils
pnpm install
node initDB.js jsons/exportDataEmpty.json
If you have initialized the database before, and you want to get a clean database, you should follow the steps below:
- shutdown the database with
docker compose -f dev.docker-compose.yml down
- Delete the
../pg
folder - Delete the
../redis
folder - Delete the
prisma/migrations
folder - follow the steps above to initialize the database again