Move messages into new database format