Migration from old mysql to new methods