update sku mapping config
This commit is contained in:
@@ -30,8 +30,9 @@ return new class extends Migration
|
|||||||
$table->text('note')->nullable()->default(null)->comment('备注信息');
|
$table->text('note')->nullable()->default(null)->comment('备注信息');
|
||||||
$table->timestampsTz();
|
$table->timestampsTz();
|
||||||
|
|
||||||
// 创建联合唯一索引
|
// 创建联合唯一索引:确保同一平台的同一产品只能有一条映射记录
|
||||||
$table->unique(['platform_id', 'platform_product_id', 'origin_sku'], 'uk_platform_product_origin');
|
// 原始 SKU 的约束由业务侧实现
|
||||||
|
$table->unique(['platform_id', 'platform_product_id'], 'uk_platform_product');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user