fix(number-fields): избегаем потери точности длинных чисел
- number-поля теперь рендерятся как text + inputMode=numeric, чтобы браузер не округлял значения через input type=number - пробелы при вставке в number-поля удаляются - бэкенд нормализует значения number-полей в строку перед сохранением - добавлен хелпер normalizeFieldValueForStorage Closes: искажение расчётного счёта и других длинных числовых полей
This commit is contained in:
17
migrations/0016_cleanup_orphans.sql
Normal file
17
migrations/0016_cleanup_orphans.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- Cleanup orphaned RAG embeddings for deleted forms, tasks, and task messages
|
||||
-- This is a one-time cleanup for data left behind before RAG deletion hooks were added
|
||||
|
||||
-- Delete orphaned form embeddings
|
||||
DELETE FROM rag_embeddings re
|
||||
WHERE re.entity_type = 'form'
|
||||
AND NOT EXISTS (SELECT 1 FROM forms f WHERE f.id = re.entity_id);
|
||||
|
||||
-- Delete orphaned task embeddings
|
||||
DELETE FROM rag_embeddings re
|
||||
WHERE re.entity_type = 'task'
|
||||
AND NOT EXISTS (SELECT 1 FROM tasks t WHERE t.id = re.entity_id);
|
||||
|
||||
-- Delete orphaned task_message embeddings
|
||||
DELETE FROM rag_embeddings re
|
||||
WHERE re.entity_type = 'task_message'
|
||||
AND NOT EXISTS (SELECT 1 FROM task_messages tm WHERE tm.id = re.entity_id);
|
||||
Reference in New Issue
Block a user