2

I'm trying to migrate a Magento store from 1.8.1 to 2.3 using the Magento migration tool. I'm getting an error as follows:

[2019-03-05 09:59:43][INFO][mode: data][stage: data migration][step: Map Step]: started 29% [========>-------------------] Remaining Time: 40 secs In Mysql.php line 173:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'added_at' cannot be null

There doesn't seem to be a lot of information to help find what the cause is. Has anyone else come across this or can someone suggest how to work out where to look and sort it out? Thanks

  • According to your error, it looks like it comes from 3rd party module or custom modification. – Rk Rathod Mar 5 at 10:21
  • you have find this column after null value not acceptable so remove it or set empty string as value of this field – Rakesh Donga Mar 5 at 10:33
0

Sad to answer your own question I know but I found the problem/solution and I'm posting how in case it helps anyone else.

  • I looked in the migration.log which had the following line at the point the migration failed: [2019-03-05 10:25:49][DEBUG][mode: data][stage: data migration][step: Map Step][table: core_email_template]: migrating
  • I also looked for all tables with the column added_at using phpinfo
  • This included two relevant tables: core_email_template in my source database and email_template in my destination database.
  • Again, using phpinfo to look at the constraints on these tables, the added_at column allows NULL in the source but not in the destination.
  • So I added a valid date into the source table and reran the migration, and the error was resolved.
  • Phew!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.