-
Notifications
You must be signed in to change notification settings - Fork 138
Troubleshooting Upgrades
When coming from older versions of MunkiReport, there are a few common errors that you may see and things you may miss.
Not Found
The requested resource /index.php? was not found on this server.
Document root is now in a directory called /public
. The best practice is to serve your MunkiReport instance from this directory or make a symlink to this directory.
Serve the public
directory not the MunkiReport root.
ERROR: SQLSTATE[HY000]: General error: 17 database schema has changed...
The schema change error means literally that, the schema of the table has changed and you can’t alter the table anymore without reloading.
Rerun the migration.
ERROR: SQLSTATE[HY000]: General error: 1 no such column: ...
There may be a column that the migration wants to update that was never in the original table and the sql query is failing. (someone have a better explanation for this one?)
Drop the failed migration table or manually convert the data. It will be named table-name_orig
. This table holds the old data that is being migrated. If it is a table you don't mind losing, it is much simpler to drop and start over.
In tests, 2.7.3 -> 4.x had trouble with bluetooth and munkireport tables and 2.13 -> 4.x had troubles with the smart_stats table.
ERROR: SQLSTATE[HY000]: General error: 1 index power_manufacture_date already exists
The index already exists. SQL indexing is not my strong point. I'm not sure why this is happening TBH.
Edit the database and drop the indexes for the table with the issue.
If you'd like to contribute, here is the pseudo-code I used for testing. https://gist.github.com/joncrain/a1ae1e35bd4d2d1c0ada2dca23e27b24 It would be helpful to have more tests with actual data.
- General Upgrade Procedures
- How to Upgrade Versions
- Troubleshooting Upgrades
- Migrating sqlite to MySQL