update sql messages structure