When updating an appstore app, execute a database update

See #5202
Merge pull request #5551 from owncloud/fix-5202-master

When updating an appstore app, execute a database update