{"id":"6bba69d0-58fe-49e2-af76-150216a7dae5","task":"Implement commercetools product type and attribute schema migration with backward-compatible rollout across multiple regions","domain":"commercetools product type management","steps":["Create a new product type version by adding the new attributes to the commercetools product type using the addAttributeDefinition action on the Update Product Type endpoint, making new attributes non-required to avoid breaking existing products","Deploy the schema change to non-production projects first and run integration tests that read and write the new attribute on sample products to confirm there are no projection or search indexing errors","Write a migration script that fetches all existing products of the affected product type using the Product Projections Search endpoint and updates them to set a default value for the new required attributes using bulk update actions","Use commercetools optimistic concurrency (version field) in the migration script to handle concurrent writes from production traffic during the migration window","After all products are migrated, update the product type to mark the new attribute as required if appropriate, and deploy updated storefront and integration code that reads the new attribute","Verify in all regional project copies that the search index reflects the new attribute by querying the Product Projections Search endpoint with a filter on the new attribute value"],"gotchas":["commercetools product type attribute definitions cannot be renamed or have their type changed after creation; plan the schema carefully because changes require creating a new attribute and migrating data","Adding a non-required attribute to a product type does not retroactively populate it on existing products; the search index will return null for the attribute on unmigrated products, which can break facet queries","commercetools projects in different regions are completely independent; schema migrations must be applied separately to each regional project and data migration scripts run independently"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/6bba69d0-58fe-49e2-af76-150216a7dae5"}