Bug in migration scripts: Foreign keys (again).
See this line:
https://code.vtiger.com/vtiger/vtigercrm/blob/master/modules/Migration/schema/660_to_700.php#L1790
During a migration from vt6 to vt7 this will probably never work. The reason is because the vtiger_cvstdfilter
table will almost certainly never contain ALL cvids present in the vtiger_customview
table or a customview might have been removed but the stdfilter entry remains.
From the MySQL manual (https://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html):
Foreign key relationships involve a parent table that holds the central data values, and a child table with identical values pointing back to its parent. The FOREIGN KEY clause is specified in the child table. It will reject any INSERT or UPDATE operation that attempts to create a foreign key value in a child table if there is no a matching candidate key value in the parent table.
In my customised cli-based migration scripts I always have $db->setDieOnError(true);
so when an error occurs the process stops and I can address it. Without it, the failures generally go unnoticed. I have mentioned other errors of this kind in the past...