changes to match new postgres backend
match new sql backend
add alert message