[db] fix for updating next alarm message
[db] bug fix