Add history migration script.

http://rbcommons.com/s/twitter/r/212