Fixed a bug in mysql migration