Content
View differences
Updated by Marcello Rocha Pereira 11 months ago
We need to create scripts that impede the upgrade of OpenProject in case old format jobs exist on the database.
The scripts should be added to the [entrypoint of our docker images](https://github.com/opf/openproject/blob/dev/docker/prod/entrypoint.sh) and probably to the [preinstall hook of our pre-built packages](https://github.com/opf/openproject/blob/dev/packaging/addons/openproject/bin/preinstall).
Said script should run the query below:
```SQL
SELECT COUNT(*)
FROM "good_jobs"
WHERE finished_at IS NULL AND is_discrete IS NOT TRUE
```
IF the query return anything but zero, the install / upgrade should be aborted.
<MORE DETAILS COMING SOON>
The scripts should be added to the [entrypoint of our docker images](https://github.com/opf/openproject/blob/dev/docker/prod/entrypoint.sh) and probably to the [preinstall hook of our pre-built packages](https://github.com/opf/openproject/blob/dev/packaging/addons/openproject/bin/preinstall).
Said script should run the query below:
```SQL
SELECT COUNT(*)
FROM "good_jobs"
WHERE finished_at IS NULL AND is_discrete IS NOT TRUE
```
IF the query return anything but zero, the install / upgrade should be aborted.
<MORE DETAILS COMING SOON>