Symptoms
Plesk Installer / plesk repair installation utility fails with one of the error messages below:
CONFIG_TEXT: ===> Plesk database scheme upgrade has been started.
Applying migrations from: /usr/local/psa/bootstrapper/pp18.0.79-bootstrapper/migrations/
Migration failed: 17.5.0/2016-12-26-09-56-48_change_dates_default_value.php
Table 'psa.PleskPagesStat' doesn't exist
CONFIG_TEXT: Applying migrations from: /usr/local/psa/bootstrapper/pp18.0.79-bootstrapper/migrations
Migration failed: 17.6.0/2017-04-04-06-56-59_remove_id_from_actions.php
Query failed: UPDATE log_actions la LEFT JOIN actions a ON la.action_id = a.id SET la.action_name = a.name
Unknown column 'la.action_id' in 'on clause'
Cause
Empty SchemaVersions table in the Plesk database:
MYSQL_LIN: MariaDB [psa]> select * from SchemaVersions;
Empty set (0.000 sec)
Resolution
- Connect to your Plesk server via SSH.
-
Extract the latest
SchemaVersionsvalue from migration scripts in with the command:# LATEST_MIGRATION=$(find /usr/local/psa/bootstrapper/pp18.0.79-bootstrapper/migrations/ -name '*.php' \
| sed -E 's#.*/([0-9]{4})-([0-9]{2})-([0-9]{2})-([0-9]{2})-([0-9]{2})-([0-9]{2})_.*#\1\2\3\4\5\6#' \
| sort | tail -1) -
Create a new row with the extracted
SchemaVersions:# plesk db "INSERT INTO SchemaVersions (version) VALUES ('$LATEST_MIGRATION');"
-
Verify that the table has been created. It should look similar to:
# plesk db "select * from SchemaVersions;"
+----------------+
| version |
+----------------+
| 20260511105608 |
+----------------+ -
Restart Plesk Update:
# plesk installer --select-release-latest --upgrade-installed-components
Comments
Please sign in to leave a comment.