I recently upgraded my iPhone 5 16 GB to iOS 9.3.1. This resulted in all text messages being deleted from the Messages app.
The phone was running low on space so I thought the issue could be due to lack of space.
I also noticed that any new text messages get deleted after a few hours.
I have now upgraded my phone to an iPhone SE 64GB (which is also iOS 9.3.1).
However, any new text messages that I receive are still being deleted after a few hours.
Also incoming messages don't creates any notifications even though the settings see to be OK
When upgrading to the new phone I restored a backup of the previous phone from iCloud
I have checked message settings and 'Keep Messages' is set to 'Forever'
I have also tried to disable iMessage but this does not have any effect.
I can live with losing the old text messages and there's plenty of online advice about retrieving them from backups.
However I really need to fix the issue for any new messages