change mysql to sequel