bug #66: SQL implicit conversion of int to string causes Redmine 500 error

Change-Id: I9ad796998c3555d5a3b367c8823b90f58744dd04
Merge pull request #5 from kithril/master

bug #66: SQL implicit conversion of int to string causes Redmine 500 error