Restore the SQL storage of notifications

Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>