tuan-tu-tran / ades

Plate-forme web de gestion de dossiers d'élèves pour éducateurs scolaires
www.educ-action.be
GNU General Public License v3.0
0 stars 0 forks source link

fix upgrade when starting from empty db #148

Closed tuan-tu-tran-satellit closed 3 years ago

tuan-tu-tran-satellit commented 3 years ago

If you configure the db connection but don't actually execute the creation script, the tables won't exist. But the db migration system will think that it must execute the 1st migration i.e. to1.0.sql, assuming that the initial creation was done.

So the idea is that if we start from 0.0, just re-execute the creation script. And I made it idempotent, so that re-executing it would not cause an issue.