Raise exception if we specify a nonexistent column for sorting
Regenerated last activity table