generate migration serial based on max rather than size
fixing serial generation