Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrator empty values handling #620

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Sep 16, 2022

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 github-actions bot added this to the 4.0 milestone Sep 16, 2022
@github-actions github-actions bot added the bug label Sep 16, 2022
@amazeika
Copy link
Member

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

@johanjanssens
Copy link
Member

@amazeika Is this not related to this: joomlatools/joomlatools-framework-migrator#13

@amazeika
Copy link
Member

amazeika commented Jan 5, 2023

@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 amazeika modified the milestones: 4.0, 4.1 Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrator empty values handling
3 participants