From f1bc504db69edc8f62afd1b8974976ef65bbaf65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Thu, 12 Feb 2026 15:24:51 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EB=82=B4=ED=99=94=EC=8B=A4=20=ED=92=88?= =?UTF-8?q?=EB=AA=A9=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20SQL=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tenant_id=287 대상 내화실(80019) 품목 데이터 업데이트 - code, name, unit, attributes, options 변경 Co-Authored-By: Claude Opus 4.6 --- deploys/item-naehwasil-update-20260212.sql | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 deploys/item-naehwasil-update-20260212.sql diff --git a/deploys/item-naehwasil-update-20260212.sql b/deploys/item-naehwasil-update-20260212.sql new file mode 100644 index 0000000..c922a3c --- /dev/null +++ b/deploys/item-naehwasil-update-20260212.sql @@ -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; \ No newline at end of file