I have restored the gallery DB tables from august 20. From tables before the update to version 5.0.0. I have the same error with the 5.0.1 upgrade.
With trying the manual DB update I have the error #1054 . And I have tried to set the php memory up to 256MB, unfortunately without success.