bluewave-labs / bluewave-labs/Checkmate
Upgrade to v3.3.0 fails due to existing checks_backup collection
- Dominant language
- TypeScript
- Stars
- 10.8k
- Forks
- 1.2k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 68
Description
When upgrading from **v3.2.0 to v3.3.0**, the pod fails to boot and enters a crash loop. The migration script `0002_convertChecksToTimeSeries.js` fails because the backup collection `checks_backup` already exists in MongoDB, preventing the migration from proceeding.
**Logs**
```text
error: [MongoDB](connect) Backup collection "checks_backup" already exists. Please remove it manually before running migration.
file:///app/server/dist/db/migration/0002_convertChecksToTimeSeries.js:33:15
```
**Steps to reproduce**
1. Start with an existing installation on v3.2.0.
2. Update the image tag to v3.3.0.
3. Observe the crash loop in the logs during the database migration phase.
**Expected behavior**
The migration should ideally handle existing backup collections or provide a clear automated way to resume if a previous attempt was interrupted.
**Environment**
* **Version:** v3.3.0 (upgrading from v3.2.0)
* **Platform:** Docker
* **Database:** MongoDB
**Workaround**
Manually drop the `checks_backup` collection using a database client:
`db.checks_backup.drop()`
Contributor guide
Assessment
This issue has not been assessed yet.