From eb6af6a6a326fc1fd85ad3bab4adaf3dbd48b418 Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Sun, 12 Oct 2014 22:36:20 -0700 Subject: [PATCH 1/5] updating schema version number for first install of mifosplatform-tenants database --- mifosng-db/mifospltaform-tenants-first-time-install.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mifosng-db/mifospltaform-tenants-first-time-install.sql b/mifosng-db/mifospltaform-tenants-first-time-install.sql index af8a8d8d3..38f4c8924 100644 --- a/mifosng-db/mifospltaform-tenants-first-time-install.sql +++ b/mifosng-db/mifospltaform-tenants-first-time-install.sql @@ -47,8 +47,9 @@ CREATE TABLE `schema_version` ( LOCK TABLES `schema_version` WRITE; /*!40000 ALTER TABLE `schema_version` DISABLE KEYS */; -INSERT INTO `schema_version` VALUES (1,1,'1','mifos-platform-shared-tenants','SQL','/V1__mifos-platform-shared-tenants.sql',-486745552,'root','2013-04-05 09:33:11',50,1); -/*!40000 ALTER TABLE `schema_version` ENABLE KEYS */; +INSERT INTO `schema_version` (`version_rank`, `installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`) VALUES + (1, 1, '1', 'mifos-platform-shared-tenants', 'SQL', 'V1__mifos-platform-shared-tenants.sql', -486745552, 'root', '2014-10-12 22:13:50', 896, 1), + (2, 2, '2', 'externalize-connection-properties', 'SQL', 'V2__externalize-connection-properties.sql', 210473669, 'root', '2014-10-12 22:13:51', 661, 1);/*!40000 ALTER TABLE `schema_version` ENABLE KEYS */; UNLOCK TABLES; -- From cc712e71a40d399ed2fee4d3c0f4ca515117925b Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Sun, 12 Oct 2014 23:38:59 -0700 Subject: [PATCH 2/5] Update INSTALL.md with special instructions for 1.25 or higher upgrade --- INSTALL.md | 48 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 890d30f9e..48f5fdc83 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -108,15 +108,53 @@ The two ways to get up and running with mifos platform is: #### 2.2.2 Upgrade existing database(s) - Those updating an existing MifosX installation to version 1.21.* or higher would need to upgrade the *mifosplatform-tenants* database with patch ```database/migrations/list_db/V2__externalize-connection-properties.sql``` - ``` - mysql -uroot -pmysql mifosplatform-tenants < database/migrations/list_db/V2__externalize-connection-properties.sql - ``` - Any *tenant* databases will be upgraded automatically when the application starts if the *auto_update* field of the *tenants* database table is enabled(=1). This is the default setting. Upgrading your database in this way is the recommended way as it will upgrade any *tenants* setup in the *mifosplatform-tenants* database but can be disabled by setting the *auto_update* field of the tenant to zero. +##### 2.2.2.1 Special Instructions for upgrading to MifosX versions 1.21.* to 1.24.* + +Those updating an existing MifosX installation to version 1.21.* or higher would need to upgrade the *mifosplatform-tenants* database with patch ```database/migrations/list_db/V2__externalize-connection-properties.sql``` + ``` + mysql -uroot -pmysql mifosplatform-tenants < database/migrations/list_db/V2__externalize-connection-properties.sql + ``` + +##### 2.2.2.2 Special Instructions for upgrading to MifosX versions 1.25.* or higher + +Starting from version 1.25.*, updates to *mifosplatform-tenants* database are also managed by Flyway (http://flywaydb.org/). To ensure flyway works correctly, we would have to ensure that a table named *schema_version* table is present in *mifosplatform-tenants* database and has two records in it. + +Check the status of schema_version table using the following command + +``` +mysql -uroot -pmysql + +use `mifosplatform-tenants`; +select version_rank, installed_rank, version, description from schema_version; + +``` + +The displayed result should be similar to + +``` ++--------------+----------------+---------+-----------------------------------+ +| version_rank | installed_rank | version | description | ++--------------+----------------+---------+-----------------------------------+ +| 1 | 1 | 1 | mifos-platform-shared-tenants | +| 2 | 2 | 2 | externalize-connection-properties | ++--------------+----------------+---------+-----------------------------------+ + +``` +In case, the schema_version table dows not contain the second row, insert the same using the following query + +``` +mysql -uroot -pmysql + +use `mifosplatform-tenants`; +INSERT INTO `schema_version` (`version_rank`, `installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`) VALUES + (2, 2, '2', 'externalize-connection-properties', 'SQL', 'V2__externalize-connection-properties.sql', 210473669, 'root', '2014-10-12 22:13:51', 661, 1); + +``` + #### 2.2.3 Load *mifostenant-default* schema with sample data (optional) Every release ships with sample data (offices, users, customers, loan products, savings products and a chart of accounts). The same can be restored by running the following command From d5d53ea84b35002c6ab94cd8782ec825b37e01c1 Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Sun, 12 Oct 2014 23:44:06 -0700 Subject: [PATCH 3/5] Update INSTALL.md to fix typo caused by a github bug --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 48f5fdc83..c0513d8e8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -121,7 +121,7 @@ Those updating an existing MifosX installation to version 1.21.* or higher wou ##### 2.2.2.2 Special Instructions for upgrading to MifosX versions 1.25.* or higher -Starting from version 1.25.*, updates to *mifosplatform-tenants* database are also managed by Flyway (http://flywaydb.org/). To ensure flyway works correctly, we would have to ensure that a table named *schema_version* table is present in *mifosplatform-tenants* database and has two records in it. +Starting from version 1.25.* , updates to *mifosplatform-tenants* database are also managed by Flyway (http://flywaydb.org/). To ensure flyway works correctly, we would have to ensure that table *schema_version* is present along with two entries in *mifosplatform-tenants* database. Check the status of schema_version table using the following command From 8f96e18225fddeca1ca08d548862efc1c669d9f0 Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Sun, 12 Oct 2014 23:47:23 -0700 Subject: [PATCH 4/5] Update INSTALL.md --- INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index c0513d8e8..1e2627132 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -121,9 +121,9 @@ Those updating an existing MifosX installation to version 1.21.* or higher wou ##### 2.2.2.2 Special Instructions for upgrading to MifosX versions 1.25.* or higher -Starting from version 1.25.* , updates to *mifosplatform-tenants* database are also managed by Flyway (http://flywaydb.org/). To ensure flyway works correctly, we would have to ensure that table *schema_version* is present along with two entries in *mifosplatform-tenants* database. +Starting from version 1.25.* , updates to *mifosplatform-tenants* database are managed by Flyway (http://flywaydb.org/). To ensure that flyway works correctly, verify that table *schema_version* is present along with two entries in *mifosplatform-tenants* database. -Check the status of schema_version table using the following command +Check the status of *schema_version* table using the following command ``` mysql -uroot -pmysql @@ -144,7 +144,7 @@ The displayed result should be similar to +--------------+----------------+---------+-----------------------------------+ ``` -In case, the schema_version table dows not contain the second row, insert the same using the following query +In case, *schema_version* does not contain the second row, insert the same using the following query ``` mysql -uroot -pmysql From 59622daae41542e3c1845528260e7ff50c0e5e2d Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Sun, 12 Oct 2014 23:53:43 -0700 Subject: [PATCH 5/5] Update INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 1e2627132..42ec64d70 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -144,7 +144,7 @@ The displayed result should be similar to +--------------+----------------+---------+-----------------------------------+ ``` -In case, *schema_version* does not contain the second row, insert the same using the following query +If *schema_version* does not contain the second row, insert the same using the following query ``` mysql -uroot -pmysql