add backtick for db queries to prevent postgresql errors
remove backticks around table names
Merge pull request #2348 from owncloud/fix_version_db_query

Fix db query in versions app, add backticks