Please wait...

The upgrade timed out and now I have missing columns in the database and the app complaints about it.

If during the upgrade process you get a timeout it is because your database is just too big and it takes too much time to run all the queries against your existing database.

In such case, the best is to restore your backup that you did before upgrading, and then do the upgrade again, this time from command line. If you don’t have a backup(you should though), then you might consider reinstalling the app, but if that’s not an option, what you can do, is to manually run all the queries that the upgrade process should have ran automatically for you.

MailWizz stores it’s upgrade sql files in /apps/common/data/update-sql/ folder and they are properly named after the version they upgrade to, so you will see files like 1.3.8.3.sql, 1.3.8.4.sql, 1.3.8.5.sql, 1.3.8.6.sql.
These are plain SQL files that can be ran against your database server. They don’t contain the table prefix (mw_ most likely) that you have selected during install, so you have to make sure that before executing these queries, you alter them properly so that you add their prefix.

So let’s say your app was at version 1.3.8.2 and you tried to upgrade to 1.3.8.6 and somewhere in the middle, the upgrade failed. We need to open the files 1.3.8.3.sql, 1.3.8.4.sql, 1.3.8.5.sql, 1.3.8.6.sql from /apps/common/data/update-sql/ and for each of the files, we have to manually run the queries from within( you can use the command line to run the queries or a tool like phpmyadmin).
In this case, the files 1.3.8.3.sql and 1.3.8.4.sql are empty, so there’s nothing to do for them. However, 1.3.8.4.sql contains this:

--
-- Alter the campaign table
--
ALTER TABLE `campaign` CHANGE `subject` `subject` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

So we have to run this query using the command line or phpmyadmin, but remember that first we have to add our selected table prefix to the above query. We will assume the prefix is mw_ so the above query becomes:

--
-- Alter the campaign table
--
ALTER TABLE `mw_campaign` CHANGE `subject` `subject` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

Now we can run it in phpmyadmin and move on to next file. In this case, 1.3.8.5.sql and 1.3.8.6.sql are empty, so we are done with running the queries.
Last step we have to do, is to empty the application cache, that is, empty, or rename, the folder /apps/common/runtime/cache.