Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed the steps involved in the second tutorial.

These tips are written for Mifos X users facing errors during upgrade due to schema version failure.


Panel

On this page:

Table of Contents
maxLevel3
minLevel3
printablefalse


To learn how to upgrade an existing installation of Mifos X, follow this guide: https://github.com/openMF/mifosx/wiki/Installation-FAQ's#upgrading-an-existing-installation-of-mifosx

It is highly recommended to backup your existing databases before upgrading Mifos X. 

For some users, during upgradation of Mifos X, an error (Migration of schema failed!) might occur, as shown in the screenshot below:


You should follow the following steps to fix the issue:- 

Step 1: 

Stop the Tomcat server. 

Step 2: 

For this example, we shall be considering the following error:

Warning

Migration of schema `mifostenant-default` to version 251 failed! 

This error occurs when upgrading to Mifos X 15.03.1v. Go to the downloaded Mifos X folder: 

Step 3:

Go to path: mifosplatform-15.03.1.RELEASE\database\migrations\core_db.

Locate the failed version, i.e., V251 in this example.

Step 4: 

Open the SQL script in any text editor (Notepad++, Sublime Text, etc.):

Step 5:

Copy the following SQL scripts one-by-one till the semi-colon (;), as shown in the screenshot below: 

Image Modified

Step 6: 

To make things simpler, this example requires HeidiSQL. (http://www.heidisql.com/download.php

Follow the instructions below (the image displays numbers corresponding to the instruction number):

1) Go to the failed database (in this example, it is `mifostenant-default`) and click on it.

2) Click on the query tab

3) Paste the copied script (1) (from Step 5 above)

4) Click on >(play) button to run the script. 

Info

If the table already exists, it will give an error message, otherwise it will create the table. Irrespective of whether the table already exists or not, you need run all the scripts one by one as mentioned in Step 5 & 6 until all the SQL scripts (copied from Step 5) are executed.

Step 7: 

Follow the numbers mentioned in image below and the corresponding instructions:

1) Go to the table schema_version.

2) Click on Data.

3) Scroll to version 251 (for this example) and make sure the table name is the same (like the paymentType_table shown below).

4) Scroll to the right side of the page. 

5) The value of the success column will vary between 0 (for failure) and 1 (for success). Change this value to 1 and click on the other table to make it run.

8) Make sure that the success column value has become 1(one). 

Step 8:

Restart the tomcat server.

  • If the fix is successful, you can now start using Mifos X.
  • However, if following all the steps doesn't fix the issue, then repeat all the steps above.


Similarly, if the migration of schema 'mifosplatform-tenants' to version 2 failed: 



Step 1

)

:

Go to this path: mifosplatform-15.03.1.RELEASE\database\migrations\list_db >> then to

Locate the failed version , (in this example to V2):



Step 2

) Please copy

:

Copy the script till the semi-colon (;), like showed as shown in the screenshot below screen shot

Step 3

) For easy use - mysql, I have used heide sql

:

For ease of operations, this example makes use of HeidiSQL (http://www.heidisql.com/download.php) .

Follow the numbers mentioned in the below image & the instructionsthese instructions (for more information, refer to the image below):

1) Go to the failed database (in this example, it is `mifosplatform-tenants` and ) and click on it.

2) Click in on the query tab

3) Paste the copied script (1) from the above shown example

4) Click on >(play) button which will to run the script. 

Step 4

)

:

Scroll to the right side of the page, For success column it would have been 0(zero) make it 1(one) & page 

The value of the success column will vary between 0 (for failure) and 1 (for success). Change this value to 1 and click on the other table to make it run. 

Make sure "the value in the success" column value has become 1 (one). 

Step 5

)

:

Restart the tomcat server,>> Success - you could .

  • If the fix is successful, you can now start using Mifos
x
  • X.
 >> Failed - If the schema version again gets failed for different version then please
  • However, if following all the steps doesn't fix the issue, then repeat all the steps
again for the newly failed version.  
  • above.


Related articles

Filter by label (Content by label)
showLabelsfalse
max5
spacesdocs
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "upgrade" , "version" , "mifos" , "to" , "schema" , "x" , "failed" , "due" ) and type = "page" and space = "docs"
labelsMifos X upgrade failed due to schema version