Steps to reproduce:
- Install an earlier version (e.g. 4.0)
- Upgrade to the current stable (5.4.X)
- Let it automatically update the database.
The database upgrade fails with a number of foreign key errors.
- The error already reported at:
- Tries to add a column that already exists:
3. Tries to create a FK that already exists:
Database script is idempotent: if the column/fk/object already exists, don't create it.
Include checks for whether this object already exists before creating it.