joomlatools-framework icon indicating copy to clipboard operation
joomlatools-framework copied to clipboard

Migrator empty values handling

Open github-actions[bot] opened this issue 2 years ago • 3 comments

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.

github-actions[bot] avatar Sep 16 '22 13:09 github-actions[bot]

@jebbdomingo Can you please give this a test ride? I've ported this from foliokit. Thanks.

amazeika avatar Sep 16 '22 13:09 amazeika

@amazeika Is this not related to this: https://github.com/joomlatools/joomlatools-framework-migrator/issues/13

johanjanssens avatar Jan 05 '23 22:01 johanjanssens

@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.

amazeika avatar Jan 05 '23 22:01 amazeika