{
  "synthetic": true,
  "execution": "Teaching record only; no live integration tested",
  "slug": "metafield-type-migration-rehearsal",
  "group": "catalogue",
  "title": [
    "Rehearse a metafield type change with real-shaped values",
    "改metafield类型前，先演练旧值去向"
  ],
  "intro": [
    "A catalogue supplier may propose changing a free-text dimension into a typed measurement. Before approving a schema edit, decide which old values can be mapped, which require review and which must remain unresolved. A tidy field definition does not prove the catalogue survived.",
    "供应商可能建议把自由文字尺寸改为结构化测量。批准结构变更前，应确定哪些旧值可映射、哪些要人工复核、哪些必须保留未知；字段定义整齐，不证明目录资料完整。"
  ],
  "facts": [
    [
      "Shopify warns that migrating between incompatible metafield types makes existing values invalid. Definition changes need a value-level migration plan.",
      "Shopify提示不兼容类型迁移会使旧值无效，因此改定义需要逐值迁移计划。",
      "https://shopify.dev/docs/apps/build/metafields/list-of-data-types#metafield-type-migration"
    ]
  ],
  "columns": [
    [
      "Synthetic old value",
      "Proposed typed output",
      "Decision"
    ],
    [
      "合成旧值",
      "拟定结构输出",
      "决定"
    ]
  ],
  "example": [
    [
      [
        "P1: “120 cm”",
        "dimension:120 CENTIMETERS",
        "Map after unit confirmation"
      ],
      [
        "P1：“120 cm”",
        "dimension:120 CENTIMETERS",
        "确认单位后映射"
      ]
    ],
    [
      [
        "P2: “1.2 m”",
        "dimension:1.2 METERS",
        "Equivalent120 cm; preserve original evidence"
      ],
      [
        "P2：“1.2 m”",
        "dimension:1.2 METERS",
        "等于120厘米；保留原始依据"
      ]
    ],
    [
      [
        "P3: “120”",
        "Unit unknown",
        "Quarantine; do not assume cm"
      ],
      [
        "P3：“120”",
        "单位未知",
        "隔离复核，不能默认厘米"
      ]
    ],
    [
      [
        "P4: “120–140 cm adjustable”",
        "Single scalar loses range",
        "Needs a different data model"
      ],
      [
        "P4：“120–140 cm可调”",
        "单一数值丢失范围",
        "需要不同数据模型"
      ]
    ]
  ],
  "steps": [
    [
      "Export a protected snapshot with product ID, namespace/key, current type and exact raw value. Agree the target type and unit vocabulary with the catalogue owner.",
      "保存受保护快照，含商品ID、namespace/key、当前类型及准确原值；与目录负责人约定目标类型及单位词表。"
    ],
    [
      "Run an offline mapping first. Mark ambiguous units and ranges as blocked rather than cleaning them into plausible numbers. Keep a reversible old-to-new mapping keyed by stable product ID.",
      "先离线映射；模糊单位与范围标为阻塞，不能清洗成看似合理数字；按稳定商品ID保留可追溯的新旧对照。"
    ],
    [
      "Rehearse on authorised test data, verify template rendering and export readback, then ask the merchant to approve the change plan and rollback procedure.",
      "用获准测试数据演练，核对模板显示及导出回读，再由商家批准变更和回退方案。"
    ]
  ],
  "result": [
    "Only two of four rows are presently mappable. P3 is not zero, and P4 is not simply 120. Counting “four fields migrated” would conceal two information losses. A useful supplier quote includes the exception workload and the display changes required by the new type.",
    "四行里目前只有两行可映射。P3不是零，P4也不只是120；声称“四条迁移完成”会掩盖两处信息损失。供应商报价应包含例外处理工作和新类型需要的显示调整。"
  ],
  "accept": [
    "Require full input-row reconciliation, explicit blocked rows and a readback of typed values plus rendered outputs. Passing a JSON shape check alone is insufficient.",
    "验收须逐行对账，明确阻塞项，并回读结构值及显示结果；JSON格式通过不够。"
  ],
  "limit": [
    "Illustrative mapping, not a Shopify API call or universal conversion tool. Actual target types, validation constraints, app dependencies and compatibility must be checked against the chosen version and store.",
    "仅为映射教学，没有调用Shopify API，也不是通用转换工具。目标类型、验证限制、应用依赖与兼容性须按所选版本及店铺核对。"
  ]
}
