changing sql file to set null on delete of member, in transaction