Unknown column 'revision' in 'where clause'