Updating & Upgrading

POSVelo follows Semantic Versioning — MAJOR.MINOR.PATCH:

ChangeMeansYour action
PATCH (e.g. 2.0.0 → 2.0.1)Bug/security fixes, no schema changesAlways safe. Rebuild.
MINOR (e.g. 2.0.0 → 2.1.0)New features, additive onlySafe. Rebuild; migrations run automatically.
MAJOR (e.g. 2.x → 3.0.0)May change the API/schemaRead the upgrade notes first.

The current version and full history are in CHANGELOG.md in your download.

Updating a Docker install

  1. Back up your database first (see Deploy to Production).
  2. Download the new POSVelo version from your CodeCanyon downloads.
  3. Replace the Backend and Frontend folders with the new ones. Keep your existing .env and your Docker volumes.
  4. Rebuild and restart:
    docker compose up -d --build
    
  5. 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 deploy applies 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.

  1. Back up the database before you replace the folders.
  2. 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 the worker container. On a manual install, run npm run worker as a second process (pm2 start npm --name posvelo-worker -- run worker, see Deploy to Production).
  3. 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.
  4. 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_KEY between versions once HR data has been saved — encrypted fields are decrypted with the same key.

Rolling back

If an update misbehaves:

  1. Restore your database backup.
  2. Put back the previous Backend/Frontend folders.
  3. Rebuild (docker compose up -d --build).

Because you backed up before upgrading, you can always return to a known-good state.