-- llx_scrap_reason_migrate_t_to_c.sql
-- Migration: rename T-01..T-10 codes to C-01..C-10
-- Idempotent: INSERT IGNORE + DELETE WHERE safe to re-run

INSERT IGNORE INTO llx_scrap_reason (code, label, category, active, position) VALUES
('C-01', 'Drilled incorrectly', 'T', 1, 1),
('C-02', 'Over Linished',       'T', 1, 2),
('C-03', 'Undersize trim',      'T', 1, 3),
('C-04', 'Oversize trim',       'T', 1, 4),
('C-05', 'Setup',               'T', 1, 5),
('C-06', 'Holes out of spec',   'T', 1, 6),
('C-07', 'Came off fixture',    'T', 1, 7),
('C-08', 'Wrong program',       'T', 1, 8),
('C-09', 'Development',         'T', 1, 9),
('C-10', 'Damaged / Dented',    'T', 1, 10);

DELETE FROM llx_scrap_reason WHERE code IN ('T-01','T-02','T-03','T-04','T-05','T-06','T-07','T-08','T-09','T-10');
