Mifos 1.4 to 1.5 DB Upgrade
Mifos 1.4.x to Mifos 1.5.x Upgrade Notes For Large Databases
After release of Mifos 1.4 one major database upgrade (237) was added in Mifos 1.5 to increase the limit of Loan Amount in Loan Product. Prior to Mifos 1.5 only 7 digits before decimal amounts were allowed, now Mifos 1.5 can handle Loan Amount upto 14 digits before decimal.
This database upgrade can take upto 48 hours on large database (75 GB or more). Hence it's recommended to apply this upgrade manually on Mifos 1.4.x in small parts on different days before planning to upgrade to Mifos 1.5.x to avoid long downtime.
NOTE: This upgrade should be applied manually only on Mifos 1.4.x with large database (not required for database size less than 20 GB as it will be applied automatically during normal installation).
Technically this upgrade on Mifos 1.4 manually means you are increasing the size of decimal columns in Mifos database which should not affect the normal operation of Mifos 1.4. Applying this upgrade manually will make sure that the downtime required to upgrade to Mifos 1.5 won't be huge.
Procedure to apply upgrade 237 manually.
- Check database version number. Query "SELECT * FROM database_version;" should return database version 225.
- Break upgrade 237 in parts, every part should contain one query only.
- Check on your test environment (same database and hardware configuration) how much time these queries will take on your database (note down time for each part), the time taken by these queries will depend on hardware and environment settings (and database size).
- Schedule the group of parts on the basis of time taken by queries and downtime you can afford.
- Backup the database and apply queries as per your planing.
- Make sure all queries from upgrade 237 are applied.
- You are now ready to upgrade to Mifos 1.5, you can run Mifos 1.4 as long as you want.
NOTES:
- It may be possible that you can execute this upgrade queries (all in ones) during weekends when you can afford the downtime of at least a day or two. But make sure you confirm the time taken by whole script by running that on testing environment (similar database and hardware) before doing that on production environment.
- Find out which tables are large/medium/small using "SELECT TABLE_NAME,TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = <YOUR_MIFOS_DB_NAME>".
- All the queries should take less time than financial_trxn table query.
Send your queries to the mailing list