sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
237 stars 95 forks source link

Upgrade command should fail if no previuos version number can be found. #1741

Closed woodfighter closed 7 months ago

woodfighter commented 7 months ago

Currently the sympa upgrade cli command when not given an explicit previous version via the from parameter checks the file data_structure.version in the config directory. But instead of stopping if this also doesn't exist it assumes the previous version to be zero an consequently tries to apply all data upgrades. This patch just lets upgrade err on the safe side. If the previous behavior is needed passing along a --from 0 should suffice.

ikedas commented 7 months ago

Confirmed. @woodfighter , thank you for fixing bug! This PR will be merged in some days.