joomlatools-framework
joomlatools-framework copied to clipboard
Migrator empty values handling
Closes #619
Test instructions
- Install latest DOCman and add some data to it (categories/documents).
- Export the data.
- Check the CSV export of the categoires/documents and see that NULL datetimes are exported as empty values in the CSV rows (....,,,....)
- Import this data first on a site without this fix and check the datetime values in the categories/documents tables. On my end and while running MySQL 8, I had these empty (previously NULL on database) values added as 0000-00-00 00:00:00 values even if default values for those columns are NULL. If this is the case then proceed to the next step to test the fix.
- Import the same data on a new site with the fix in.
Expected result: the empty CSV values are properly imported as NULL values in the tables.
@jebbdomingo Can you please give this a test ride? I've ported this from foliokit. Thanks.
@amazeika Is this not related to this: https://github.com/joomlatools/joomlatools-framework-migrator/issues/13
@amazeika Is this not related to this: joomlatools/joomlatools-framework-migrator#13
@johanjanssens not really, no ... this is a weird MySQL behavior that I've spotted on which empty values are being casted to arbitrary default values, even if the default value that's set in the column is NULL.