When exporting a MigxDB using the Built in export, it creates a CSV with all columns in my main table and the related table. But if this CSV is then imported it does not import into the related table.
Step to reproduce
Create a MigxDb table with appropriate composite relationships, enable export options in Migx config, include Joins Json as per screenshot example and export. Then import CSV.
import does not work, it will not even correctly import into primary table, most likely due to the extra columns in the CSV.
I have looked at the import importcsv.php file in the core migx component and i can not seen anything in there related to importing related tables.
Import Main table and then go to the related table and import the related data that match the “alias_column” columns
Maybe you can export/import both database tables separately.
Or use phpMyAdmin to export/import the data directly from the database.
Yep i am more than capable of all of the above (which is what i would do) but it is more for a client to have the ease of exporting from one table and importing back into that one table and have it do all the relations at the same time. I thought this was the reason why the export supported exporting joins?
Usually with MIGX you can write your own custom processors.
If you copy the import file to
core/components/yourpackage/processors/mgr/default/importcsv.php, it should then run this new file when you import the data. Then add some custom code to handle your specific needs.
Yes i have that configured for another processor (trash processor to delete related composites for certain tables) but i was hoping that it was something i was missing. Naturally i thought that the system supported exporting relationships so it would therefore support importing that same CSV back in with the relationships considered. Might need to request that feature