Config to sql