Overview
Activepieces ships a rollback command that reverses database migrations when you need to downgrade to a previous version. Most releases are fully rollback-safe — the release notes will let you know if one isn’t.Backups
For most upgrades you won’t need a backup, but if you want to be extra safe:PostgreSQL
PGLite
Copy thepglite folder inside your configured AP_CONFIG_PATH:
Release Notes
Releases that include non-reversible database changes will have a note at the bottom of the release notes mentioning which migrations are affected. If you don’t see a note, the release is rollback-safe.Rolling Back
The rollback command runs against the current (newer) image since it has the migration reversal logic. After rolling back the database, you swap to the older image.Step 1: Stop Activepieces
Step 2: Run the rollback command
Replace0.78.0 with your current version and 0.77.0 with the version you want to go back to:
--force:
Step 3: Switch to the older image
Update yourdocker-compose.yml:
Step 4: Start Activepieces
Restoring From Backup
If you took a backup and prefer to restore from it:docker-compose.yml to the previous image version and start Activepieces.
For Contributors
Every new database migration must:- Implement
Migrationinstead ofMigrationInterface - Set
breakingtotrue(destructive changes) orfalse(additive only) - Set
releaseto the target release version (e.g.,'0.78.0') - Implement
down()with working rollback queries