I am trying to figure out where in the database schema is stored the information about the kind of flag that has eventually been raised on a given answer.
It seems spam/offensive flags should generate some kind of entry in the Votes
table with VoteTypeId
12 or 4. But it actually doesn't, for the posts I checked (as an example, see this query, this was a post I flagged as spam myself - you need 10k on EE.SE to see it, though - you can see the downvotes, the deletion, the fact it was sent in moderator review queue, but no explicit trace of a spam flag).
Regarding the NAA flags, I don't see anything in the schema that could directly relate to this.
But why do I need this?
Because there has been this question: Someone has been upvoting nonsense non-answers on meta EE.SE. And I recently realized that we could actually get some information about deleted posts on SEDE. So I thought: "Hey, imma just make a query to get the posts that have upvotes while having been flagged as NAA, to check if there has been an increase of these cases recently!"
But it seems I can't, can I? The only thing I can do is checking if the post has been in the moderator review queue (VoteTypeId = 15
), which should have been the case for all flagged posts, whetever the kind of flag raised.