refs #739: preserve Smilegate changes before repository layout migration

This commit is contained in:
devmrko
2026-08-03 11:12:19 +09:00
parent 022ae7f9d2
commit 4d2964b5c6
58 changed files with 3002 additions and 291 deletions

View File

@@ -0,0 +1,38 @@
-- STD-12 is a multi-target orchestration case, not a reusable SQL few-shot.
-- Preserve SG_AI_QA_QUESTION as the customer benchmark; remove only its
-- invalid vector-example row so it cannot be managed as a few-shot.
DECLARE
v_count PLS_INTEGER;
BEGIN
SELECT COUNT(*)
INTO v_count
FROM sg_qa_vector_example
WHERE example_id = 51
AND source_case_id = 'STD-12'
AND source_type = 'CUSTOMER_QA_BENCHMARK';
IF v_count <> 1 THEN
RAISE_APPLICATION_ERROR(-20051, 'Expected exactly one invalid STD-12 few-shot row.');
END IF;
DELETE FROM sg_qa_vector_example
WHERE example_id = 51
AND source_case_id = 'STD-12'
AND source_type = 'CUSTOMER_QA_BENCHMARK';
IF SQL%ROWCOUNT <> 1 THEN
RAISE_APPLICATION_ERROR(-20052, 'Invalid STD-12 few-shot row was not deleted.');
END IF;
COMMIT;
END;
/
SELECT COUNT(*) AS remaining_fewshot_rows
FROM sg_qa_vector_example
WHERE example_id = 51;
SELECT COUNT(*) AS preserved_question_rows
FROM sg_ai_qa_question
WHERE question_code = 'STD-12';