Updating the Kit
Safely merge Achromatic updates into a customized Prisma project.
Achromatic ships updates through the private pro-nextjs-prisma repository.
Keep your product repository as origin and add Achromatic as a separate
upstream source of updates.
Add the Achromatic remote
Run this once from your project root:
git remote add achromatic https://github.com/achromaticlabs/pro-nextjs-prisma.git
git fetch achromaticConfirm that origin still points to your product repository:
git remote -vKeep your own repository as origin
Do not change the tracking branch for your product's main branch
to the Achromatic repository. Your commits should continue to push to your own
remote.
Review an update before merging
Start with a clean working tree and fetch the latest release:
git status --short
git fetch achromatic
git log --oneline --decorate HEAD..achromatic/main
git diff --stat HEAD...achromatic/mainRead the Achromatic changelog and inspect changes that touch authentication, database migrations, billing, environment variables or deployment before merging them.
Merge on a dedicated branch
Create a branch from your current product state, then merge the upstream code:
git switch -c update/achromatic
git merge achromatic/mainResolve conflicts in favor of your product requirements while preserving security fixes and new committed migrations. Do not regenerate or delete migration history just to make a merge clean.
After resolving conflicts:
npm install
npm run typecheck
npm run lint
npm run test
npm run buildRun the authenticated E2E suite against a disposable database when the update changes authentication, organizations, billing, credits, settings or the admin area:
npm run test:e2e:setup
npm run test:e2eApply database changes safely
Review new migration files before applying them. Back up any database containing data you need, then run the kit's deployment migration command in each target environment:
npm run db:migrateThe Prisma kit applies the committed migrations supplied with each update. Generate a new migration only for schema changes made by your product, not for migration files already supplied by Achromatic.
Finish the update
Test the update branch in a preview environment. When it is ready, merge it into your product's main branch using your normal review workflow.
If an update is too large to merge at once, review the upstream commits and cherry-pick a focused security or dependency fix. Record skipped commits so the same conflict is not investigated again during the next update.