moved preferences sql