---
apiVersion: data-spec/v1
id: order-product-custom-label-rename-20260426
description: "Rename legacy order_product__c metadata label to avoid collisions with standard OrderItem label during platform-core apply"
issue: "#2019"
created: 2026-04-26
scope: production-only
status: pending
tables: [_System_Object]
depends_on: []
---

# Order Product Custom Label Rename

## Summary

The PingCAP org still contains legacy object metadata row `order_product__c`
with label `Order Product`. Standard `OrderItem` also uses label
`Order Product` in Salesforce parity metadata. This causes
`_System_Object.Label` unique-key conflicts during `platform-core` apply.

This spec renames only the tenant custom-object label to
`Order Product Custom Details`, preserving object API names and data rows.

## Changes

### 1. Preflight

```sql
SELECT Id, ApiName, Label, IsCustom, IsDeleted
FROM _System_Object
WHERE ApiName = 'order_product__c';
```

Expected pre-apply state on affected orgs: one active row with
`Label = 'Order Product'`.

### 2. Apply label rename

```sql
UPDATE _System_Object
SET
  Label = 'Order Product Custom Details',
  LastModifiedDate = NOW()
WHERE ApiName = 'order_product__c'
  AND IsDeleted = 0
  AND COALESCE(Label, '') <> 'Order Product Custom Details';
```

**Idempotency**: re-running is safe because the `WHERE` clause updates only
rows whose label is not already the target value.

### 3. Audit

```sql
SELECT ApiName, Label, IsDeleted
FROM _System_Object
WHERE ApiName = 'order_product__c'
  AND IsDeleted = 0
  AND Label <> 'Order Product Custom Details';
```

Expected result after apply: zero rows.

## Rollback

```sql
UPDATE _System_Object
SET
  Label = 'Order Product',
  LastModifiedDate = NOW()
WHERE ApiName = 'order_product__c'
  AND IsDeleted = 0
  AND COALESCE(Label, '') <> 'Order Product';
```
