iOS 4.1 sms messages database to iOS 11 I'm looking to restore my old messages to my new iPhone however when restoring from backup the messenger app stops working. Apple support say its the database that is corrupt. From looking at the .db files of 4.1 and 11 the schema is different.

Are there any scripts/tools to move the old data into the newer format. I've tired 9 tools so far and they either cant read the old db or cant transfer them into the new one.

Only tool that comes close is icopybot, but I get an error constraint 2067 about 2 fields.
You may want to try migrating the data on the phone to an intermediary iOS. For example, if you're starting with an iPhone 3G (which has a maximum iOS of 4), then upgrade that phone to an iPhone 4S, (which can be updated to a max of iOS 9).
If you're able to upgrade from iPhone 3G to 4S, then you'll have your text messages on iOS 9.3.5, which should definitely be upgradeable to iOS 11.