Migration issue with user.last_login
When user.last_login already exists (mainly because the optional DB upgrade was executed in a prior version), the migration process generates an error which might break the upgrade:
ERROR: An exception occurred while executing 'ALTER TABLE user ADD COLUMN last_login datetime DEFAULT NULL': SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'last_login'
There is no way in MySQL to add a column only if it does not already exist, so we need to add a manual check (or to delete the field before upgrade, but this would cause another issue of loosing all the data stored in that field so far).
The query is in Version20150522222222