fix upgrade error for instances not upgraded from 4.5
Merge pull request #2656 from owncloud/fix_2642

fix upgrade error for instances not upgraded from 4.5