How to migrate a Mantis 1.2.0rc1 database into Redmine
This URL explains how to migrate a Mantis database into Redmine.
Unfortunately the script was tested with 1.0.x Mantis databases, and if you try with a 1.2.0rc1 version, you'll get into troubles.
But don't worry, I faced these problems myself and took the time to fix them all!
There were mainly two problems:
- Mantis changed the way categories are stored in the database.
The data model used in the migration script must be adapted to reflect these changes.
- Dates in Mantis are now stored as Unix timestamps.
The migration script didn't complain, but trying to use Redmine after the migration resulted in "internal server errors" everywhere, because of 'Nil' dates.
So lucky you, here is how to migrate a Mantis 1.2.0rc1 database into Redmine, in two simple steps (assuming you have a working fresh Redmine installation):
- Run this SQL script on your Mantis database.
This script will just add some columns using the date format expected by the Redmine migration script.
This means that your Mantis installation will still be usable afterwards.
Anyway, for maximal security, I recommend that you do a backup of your Mantis database before running this script. - Run this modified version of the migrate_from_mantis rake script on your Redmine fresh installation.
This modified script uses the new date columns added in previous step, and also takes care of the changes in the management of categories.
I also changed the default proposed encoding to latin1 because it is the default one for Mantis databases.
Enjoy your new Redmine installation!



