First complete pass on MySQL conversion