Hmm...something is strange. TeamMember
table was added in 3.0 so not sure why it would be attempt to load from the table during the upgrade process.
Can you share more information about your enviroment? Platform and version? DB and version? Any other info in the mattermost logs? or a larger snippet of the mattermost log?