refactor: [절곡] bending_items code를 'BD' 단일값으로 통일
- bending_items.code: prod+spec(CP,RS 등) → 'BD' (절곡품 공통 접두사) - bending_models 패턴(GR/SB/BB)과 동일 레벨로 통일 - import 스크립트 3개 + BendingCodeService.resolveItem 수정 - 마이그레이션 SQL 업데이트 - DB 266건 업데이트 완료
This commit is contained in:
@@ -15,7 +15,7 @@ public function up(): void
|
||||
});
|
||||
|
||||
// 기존 code → lot_no 이관, code에는 앞 2자리(prod+spec)만 남기기
|
||||
DB::statement("UPDATE bending_items SET lot_no = code, code = LEFT(code, 2) WHERE lot_no IS NULL");
|
||||
DB::statement("UPDATE bending_items SET lot_no = code, code = 'BD' WHERE lot_no IS NULL");
|
||||
|
||||
// unique 제약 변경: code → lot_no
|
||||
Schema::table('bending_items', function (Blueprint $table) {
|
||||
|
||||
Reference in New Issue
Block a user