The script fails during repopulate keypairs phase. The logic is good, but unfortunately SQLite3 has got a silly limitation, which does not allow having a different number of columns in a INSERT…SELECT statement, even if these missing columns have a DEFAULT clause. As pre_backup is not set, the query fails.
The following patch fixes this issue.
Priotity major as it breaks upgrades.