dgrigg / craft-migration-assistant

Migration Manager for Craft CMS
Other
27 stars 10 forks source link

Neo Field BlockTypes Deleted and Recreated During Import #44

Open github-ab-martinez opened 2 years ago

github-ab-martinez commented 2 years ago

Issue Description: When a Neo field migration is created, the field's blockTypes are not assigned their respective ids. As a result, upon import, the Neo plugin registers the blockTypes as new, and deletes the existing blockTypes for the field before creating new blockType instances with the migration data.

Impact: When the original blockTypes are deleted, any Entry which used the Neo Field is reset, resulting in data loss.

Steps to Replicate:

  1. Create an entry which uses a Neo field.
  2. Create a migration for the Neo field.
  3. Re-apply the new migration.

Result: The Neo field data for the entry created in step 1 has been reset.

dgrigg commented 2 years ago

Yes, that was intentional to ensure migrations inside Neo blocks were updating the correct block since moving block order etc caused migration issues. Are you having this issue when creating content migrations or settings migrations?

github-ab-martinez commented 2 years ago

We're having this issue with Field migrations, specifically.

tekstrand commented 2 years ago

We're still running into issues with this, we aren't able to create FIeld Setting migrations for Neo fields.

tekstrand commented 2 years ago

Our latest is that creating/running a migration for a Neo field with 42 blocks in it exhausts the php memory