docs: 내화실 품목 업데이트 배포 SQL 추가

- tenant_id=287 대상 내화실(80019) 품목 데이터 업데이트
- code, name, unit, attributes, options 변경

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 15:24:51 +09:00
parent 0e9559fcd8
commit f1bc504db6

View File

@@ -0,0 +1,46 @@
-- ============================================================
-- 내화실 품목 데이터 업데이트
-- 대상: tenant_id = 287 (경동), code = '80019'
-- 생성일: 2026-02-12
-- 변경: code, name, unit, attributes, options 업데이트
-- ============================================================
SET @TARGET_TENANT_ID = 287;
-- 안전장치
SET AUTOCOMMIT = 0;
START TRANSACTION;
-- 변경 전 확인
SELECT id, code, name, unit, attributes, options
FROM items
WHERE tenant_id = @TARGET_TENANT_ID AND code = '80019';
-- 업데이트
UPDATE items
SET
code = '내화실-WY-MA12',
name = '내화실',
unit = '',
attributes = JSON_SET(
COALESCE(attributes, '{}'),
'$.spec', 'WY-MA12'
),
options = JSON_OBJECT(
'lot_managed', TRUE,
'consumption_method', 'manual',
'production_source', 'purchased',
'material', 'SUS316L + Para aramid'
),
updated_at = NOW()
WHERE tenant_id = @TARGET_TENANT_ID
AND code = '80019';
-- 변경 후 확인
SELECT id, code, name, unit, attributes, options
FROM items
WHERE tenant_id = @TARGET_TENANT_ID AND code = '내화실-WY-MA12';
-- 확인 후 COMMIT 또는 ROLLBACK
-- COMMIT;
-- ROLLBACK;