From 46c8aa14bcfb440d9c33b6f4e99f921b1ad92e12 Mon Sep 17 00:00:00 2001 From: danielfmiranda Date: Fri, 21 Jun 2024 10:01:18 -0700 Subject: [PATCH 1/2] updated migration to migrate data from all applicable page types --- ...date_annotatedimageblock_with_linkblock.py | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/network-api/networkapi/wagtailpages/migrations/0139_update_annotatedimageblock_with_linkblock.py b/network-api/networkapi/wagtailpages/migrations/0139_update_annotatedimageblock_with_linkblock.py index ad076db3b4a..c9864244fb8 100644 --- a/network-api/networkapi/wagtailpages/migrations/0139_update_annotatedimageblock_with_linkblock.py +++ b/network-api/networkapi/wagtailpages/migrations/0139_update_annotatedimageblock_with_linkblock.py @@ -5774,7 +5774,39 @@ class Migration(migrations.Migration): model_name="blogpage", field_name="body", operations_and_block_paths=[ - (AlterStreamChildBlockDataOperation(block="image", operation=migrate_image_block), ""), + (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + ], + ), + MigrateStreamData( + app_name="wagtailpages", + model_name="buyersguidearticlepage", + field_name="body", + operations_and_block_paths=[ + (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + ], + ), + MigrateStreamData( + app_name="wagtailpages", + model_name="buyersguidecampaignpage", + field_name="body", + operations_and_block_paths=[ + (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + ], + ), + MigrateStreamData( + app_name="wagtailpages", + model_name="modularpage", + field_name="body", + operations_and_block_paths=[ + (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + ], + ), + MigrateStreamData( + app_name="wagtailpages", + model_name="primarypage", + field_name="body", + operations_and_block_paths=[ + (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), ], ), migrations.AlterField( From 041d2ceb2746d5e9d2d64ac752ead16cd9a79729 Mon Sep 17 00:00:00 2001 From: danielfmiranda Date: Fri, 21 Jun 2024 10:02:50 -0700 Subject: [PATCH 2/2] updated block name in migration op --- .../0139_update_annotatedimageblock_with_linkblock.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/network-api/networkapi/wagtailpages/migrations/0139_update_annotatedimageblock_with_linkblock.py b/network-api/networkapi/wagtailpages/migrations/0139_update_annotatedimageblock_with_linkblock.py index c9864244fb8..a0daca0eb34 100644 --- a/network-api/networkapi/wagtailpages/migrations/0139_update_annotatedimageblock_with_linkblock.py +++ b/network-api/networkapi/wagtailpages/migrations/0139_update_annotatedimageblock_with_linkblock.py @@ -5774,7 +5774,7 @@ class Migration(migrations.Migration): model_name="blogpage", field_name="body", operations_and_block_paths=[ - (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + (AlterStreamChildBlockDataOperation(block="image", operation=migrate_image_block), ""), ], ), MigrateStreamData( @@ -5782,7 +5782,7 @@ class Migration(migrations.Migration): model_name="buyersguidearticlepage", field_name="body", operations_and_block_paths=[ - (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + (AlterStreamChildBlockDataOperation(block="image", operation=migrate_image_block), ""), ], ), MigrateStreamData( @@ -5790,7 +5790,7 @@ class Migration(migrations.Migration): model_name="buyersguidecampaignpage", field_name="body", operations_and_block_paths=[ - (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + (AlterStreamChildBlockDataOperation(block="image", operation=migrate_image_block), ""), ], ), MigrateStreamData( @@ -5798,7 +5798,7 @@ class Migration(migrations.Migration): model_name="modularpage", field_name="body", operations_and_block_paths=[ - (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + (AlterStreamChildBlockDataOperation(block="image", operation=migrate_image_block), ""), ], ), MigrateStreamData( @@ -5806,7 +5806,7 @@ class Migration(migrations.Migration): model_name="primarypage", field_name="body", operations_and_block_paths=[ - (AlterStreamChildBlockDataOperation(block="image_text", operation=migrate_image_block), ""), + (AlterStreamChildBlockDataOperation(block="image", operation=migrate_image_block), ""), ], ), migrations.AlterField(