Add migration logic for notifications