Unknown column 'type' in 'field list'