-
Notifications
You must be signed in to change notification settings - Fork 6
5.x Update Quirks
Schlaefer edited this page Apr 13, 2020
·
10 revisions
Issues that makes the auto-updater fail.
- Database is very old (a decade and maybe even originating in mylittleforum). This introduces DB inconsistencies the updater is not expecting and prepared to handle, resulting in an update failure.
- Database is large (300.000+ postings). With that the DB may take a long time to execute the update commands and the PHP script times out before the DB is finished.
Check logs/saito-install.log
for hints if the update fails.
Do one 5.x update at a time to minimize potential issues.
Run manually before the update:
SET SQL_MODE='ALLOW_INVALID_DATES';
ALTER TABLE entries MODIFY created datetime NULL;
UPDATE entries SET created = NULL WHERE created < '0000-01-01 00:00:00';
SET SQL_MODE='ALLOW_INVALID_DATES';
ALTER TABLE entries MODIFY modified datetime NULL;
UPDATE entries SET modified = NULL WHERE modified < '0000-01-01 00:00:00';
Remove field email_notify manually before update start.
Check that there are not double uploads in the DB:
SELECT name, user_id, COUNT(*)
FROM uploads
GROUP BY name, user_id
HAVING COUNT(*) > 1
If so delete them:
DELETE table1 FROM uploads table1
INNER JOIN uploads table2
WHERE
table1.id < table2.id AND
table1.user_id = table2.user_id AND
table1.name = table2.name;
Convert the table manually:
ALTER TABLE entries ENGINE=InnoDB;
Skip the step in the updater by removing/disabling the following line in config/Migrations/20190729142650_Saitox5x3x0.php
$this->execute('ALTER TABLE entries ENGINE=InnoDB');