The bad news is that the only way to fix this today would be to restore your iPhone from a backup of your iPad.
The good news is that in a future update to iOS 11, Messages in iCloud will be added, and if you update your iPad and iPhone, the messages from both will upload to iCloud and unify into a single message stream.