Note: last post isn't updated when restoring a post/topic atm and sometimes not properly when deleting them. Going to change that later.
Also:
About soft deleting: atm soft deleting a topic/post updates the counters but no foreign keys (last post for example). Those are only updated on hard delete. IMHO that should be changed. Soft Deleted posts shouldn't be considered in any overview/counter as "last/first/newest whatever". They should only be displayed after you entered the forum/topic.
Note: last post isn't updated when restoring a post/topic atm and sometimes not properly when deleting them. Going to change that later.
Also: