Mysql schema changes

Fixed some schema-issues that occur on MySQL.

Please review, @cfaessler