Dear Team,
i have posted this in my blog(https://vtiger.com/blog/weblog_entry.php?e=7610) previously which cannot be modified. so that i am posting it again with some addition informations.
Here i tried to explain the migration process for all the three options provided in the migration script. Hope it will help you to understand the migration process flow for the three different options.
In the migration process we have three options
1. Give the MySQL host details of vtigercrm4.2.3 ie., vtiger 4.2.3 database details
2. Give the MySQL Dump file of vtiger4.2.3 database
3. Give the MySQL host detail which contains the 4.2.3 database – This will alter the given database directly.
Case 1. In this case we need to execute the MySQL Dump to take the 4.2.3 database dump and then apply that dump file to the current database. To execute this dump process, we need the MySQL path in the server.
For example you have hosted vtiger4.2.3 in a server and you want to migrate that 4.2.3 to 5.0 which is also in the same server. Then you need to give the MySQL path in that server inwhich location MySQL is installed. (It will automatically search for the MySQL path. if it could not be find then only the script will ask for the MySQL path in the server)
This is the simplest way for the user to migrate. But in this case the 4.2.3 database should be accessible from the current 5.0 and the MySQL path should be needed ie., MySQL path should be in the same server.
For example
i have hosted my 4.2.3 and 5.0 in the same server and MySQL is also available in the same system.
4.2.3 path ==> /home/mickie/www/html/vt423/
5.0 path ==> /home/mickie/www/html/vt50beta/
MySQL path ==> /home/mickie/mysql_5_0_19/
(Both all these are in same server ie., if my server is mickie.com then these all will be in the same server)
if the system could not found the MySQL path then i will give the MySQL path as /home/mickie/mysql_5_0_19/bin
Now the system will take 4.2.3 database dump and apply it in 5.0 and then modify.
Case 2. In this case, when we give the dump file of 4.2.3 database to migrate, the script will apply this dump in the new database. Here also we need to execute the MySQL Dump. In this case if the MySQL installation path is not found on the server (where your vtiger is running) then it will ask for the MySQL installation path.
This will be useful who has 4.2.3 and 5.0 in two different servers.
For example i have hosted 4.2.3 in one server and hosted 5.0 in another server. In 5.0 server MySQL is installed. In this case i will take 4.2.3 dump and give that dump file to migrate. so that the dump can be applied because the MySQL path is found in my 5.0 server and then the database will be modified.
My 4.2.3 is running in server1.com
My 5.0 is running in server2.com where as in my server2 i have MySQL installed.
Case 3. In this case you need to give the MySQL database details. The script will alter the given database directly. so it is recommended to not give the 4.2.3 database details where your 4.2.3 is running in production environment. In this case please do the following steps
1. Take dump of your 4.2.3 database
2. Go to the MySQL server where your current v5 is running. (inside mysql/bin directory) and enter into your mysql server
3. create a new database.
4. copy the 4.2.3 dump file to this 5.0 MySQL server (inside mysql/bin directory).
5. Apply this dump file to the new database.
6. Access the v5 client, Settings -> Migration Wizard screen and give this new database details in the migration third option.
7. when the migration finished, open the config.inc.php file(current v5 installation) and give this new database name and click on Settings -> Sharing Access -> Recalculate button, then logout and then login into the system. Now you can see your 4.2.3 data.
Now this new database will be modified to match with the 5.0 database schema. you can use this database for 5.0
This will be useful when we have 4.2.3 and 5.0 in different server where as in 5.0 server i don’t have MySQL installed.
For example
my 4.2.3 is running in server1
my 5.0 is running in server2
In my 5.0 server the MySQL is not installed.
In case 1 we will automatically take the dump of 4.2.3 and then run the migration. In this case we must need the MySQL path.
In case 2 we will apply the given 4.2.3 dump and then run the migration. In this case also we need the MySQL path.
In case 3 we will modify the given database directly where as we do not need the MySQL path. This case will be useful to the users who don’t have the MySQL in the same server in where vtiger is running.
————————
In both all these cases we will call the function RecalculateSharingRules() which will calculate the sharing rules and write it in a flat file ie., user_privileges file. so that you can login using the 4.2.3 user details.
But in the third option migration we have modified the given 4.2.3 database directly. so when we call this recalculate sharing rules function it will calculate for the currently using 5.0 database not calculate for the 4.2.3 database.
so when use third option please follow the steps mentioned here
————————
Also, in the newly installed 5.0 database there will be 306 tables, but in the migrated database there may not be that much tables because some sequence tables will not be there. ie., if you execute the query
show tables like ‘%_seq’;
in the newly installed database some 60+ tables will be there where as in the migrated database we can have some 20+ tables.
when we create new entity then the related sequence tables will be created.
————————
Also some of our community friends are facing issues with customviews, the reason for this problem is, for example i have created a custom field (cf_356) for Contacts, and i have created a customview using this custom field as a column so that cf_356 will be entered in cvcolumnlist table. After that i have deleted that customfield so that the customfield has been deleted from contactscf table but not deleted in cvcolumnlist table. so when we access this customview the cf_356 fields will be searched in contactscf table and it will not be there so that the adodb error will occur.
To fix this issue we have to remove this field from cvcolumnlist table.
we will fix this issue in coming release also when we delete customfield we have to delete this field from the corresponding cf table.
This same problem will be occured in reports related tables also.
————————
If you need any further informations or if you are in a different case then please let me know.
Thanks & Regards
Mickie