Thermodynamics of the Soret effect in ionic crystals