Updating & Upgrading
POSVelo follows Semantic Versioning — MAJOR.MINOR.PATCH:
| Change | Means | Your action |
|---|---|---|
| PATCH (e.g. 2.0.0 → 2.0.1) | Bug/security fixes, no schema changes | Always safe. Rebuild. |
| MINOR (e.g. 2.0.0 → 2.1.0) | New features, additive only | Safe. Rebuild; migrations run automatically. |
| MAJOR (e.g. 2.x → 3.0.0) | May change the API/schema | Read the upgrade notes first. |
The current version and full history are in CHANGELOG.md in your download.
Updating a Docker install
- Back up your database first (see Deploy to Production).
- Download the new POSVelo version from your CodeCanyon downloads.
- Replace the
BackendandFrontendfolders with the new ones. Keep your existing.envand your Docker volumes. - Rebuild and restart:
docker compose up -d --build - The backend applies any new database migrations automatically on start.
That's it — your data is preserved.
Updating a manual install
# Back up your database first!
# Backend
cd Backend
# (replace source files with the new version)
npm install
npx prisma generate
npx prisma migrate deploy
npm run build && npm start # or restart your PM2 process
# Frontend
cd Frontend
# (replace source files with the new version)
npm install
npm run build && npm start
Database migrations
- All schema changes ship as Prisma migrations.
prisma migrate deployapplies only the migrations your database hasn't seen yet — it is idempotent and safe to run repeatedly.- The Docker entrypoint runs this for you on every backend start.
- A minor release never removes a column or makes existing data invalid (additive only). Removals only happen in a major release, with notes.
Upgrading from 2.x to 3.0
3.0 keeps all 2.x data. Every schema change adds tables or columns; nothing is removed, and the migrations run on the next backend start.
- Back up the database before you replace the folders.
- Start the background worker. Scheduled reports, ledger posting,
online-shop sync, points expiry and HR sweeps run in their own process.
With Docker, take the new
docker-compose.yml: it adds theworkercontainer. On a manual install, runnpm run workeras a second process (pm2 start npm --name posvelo-worker -- run worker, see Deploy to Production). - Check
MASTER_ENCRYPTION_KEY. Saving an AI provider key, a WhatsApp Cloud API token, online-shop keys or an SMTP password needs it. Keep the value you already use. - Email (optional). Add the
SMTP_*values to the backend.env, or set the mail server later under Settings → System (Configuration).
Behaviour that changes for API clients: checkout now charges the catalog
price unless the user holds the price-override permission or a manager
approves, and a discount above the shop's limit needs a manager's approval
(see Selling at the POS). A sale can now also be
PARTIALLY_RETURNED.
About the v1 → v2 upgrade
v2 is the platform that adds HRM, Payroll and ESS on top of the v1 POS core.
- The v1 POS API stays the primary, active namespace at
/api/v1/*— it is not deprecated. - v2 adds the HR/Payroll suite, ESS and newer modules at
/api/v2/*(see API & Postman). There is no unversioned/api/*alias. - New HR/Payroll tables are added by migration; existing POS data is untouched.
Important: never change
MASTER_ENCRYPTION_KEYbetween versions once HR data has been saved — encrypted fields are decrypted with the same key.
Rolling back
If an update misbehaves:
- Restore your database backup.
- Put back the previous
Backend/Frontendfolders. - Rebuild (
docker compose up -d --build).
Because you backed up before upgrading, you can always return to a known-good state.