refactoring migration summarization logic
extracting up/down migration logic from `File` into separate class hierarchy