fixes
Add update-on-destroy feature
small database changes
update-on-destroy feature