The PostHistoryTypes
according to the Data Explorer are given here. However, certain HistoryTypeIds
are never present while querying the Data Explorer. The most notable missing id for my personal data task is 17 - Post Migrated
. I don't see them present either on Stack Overflow or Super User. Is there any particular reason for this?
1 Answer
This is now possible by using PostHistoryType 'Migrated away' as described in the Database schema post.
select ph.PostId as [Post Link]
, ph.CreationDate
, ph.UserId as [User Link]
, ph.UserDisplayName
, ph.Comment as target
from posthistory ph
inner join posts p on p.id = ph.postid
where posthistorytypeid = 35 -- Migrated away
and p.posttypeid = 1 -- question
order by CreationDate
At time of posting this query returns 691 rows.
I'm not sure if the 'whitelist' mentioned in this only applies to a certain posthistorytypeid or also on specific posts within a certain type.
PostHistoryTypeId
= 17 is of no value? I want to get all questions onStack Overflow
which are migrated to other platforms. What is the best way to get this data?