The backend utilizes Prisma ORM, and it is responsible for all the database schema and changes. It is strongly recommended that all migrations be done using \
prisma migrate\ command, and not directly to the database.
Peform these tests before attempting production migration:
- Run migration on last production seeded data
- Run migration on dataset resembling production
- Run npx prisma migrate dev to ensure no differences are detected after a test migration
- Run npx prisma migrate reset then migrate dev to double check no differences are detcted
Before making any schema changes, make sure to back up the database manually once, just to be in the safe area.
To back up the database, first add the Connection URL of the production DB as the \
DATABASE_URL\ value in your local .env file.