diff --git a/scripts/validate_migration.sql b/scripts/validate_migration.sql index 6e042a5..1c58d99 100644 --- a/scripts/validate_migration.sql +++ b/scripts/validate_migration.sql @@ -88,3 +88,23 @@ SELECT FROM elabdatadisp GROUP BY unit_name, tool_name_id, node_num, event_date, event_time HAVING COUNT(*) > 1; + +-- 10. Identify records with invalid/default timestamps (1970-01-01) +-- These need date recovery from MySQL +SELECT + 'rawdatacor with default timestamp' as table_name, + COUNT(*) as record_count +FROM rawdatacor +WHERE event_timestamp = '1970-01-01 00:00:00' +UNION ALL +SELECT + 'elabdatadisp with default timestamp' as table_name, + COUNT(*) as record_count +FROM elabdatadisp +WHERE event_timestamp = '1970-01-01 00:00:00'; + +-- Sample records with default timestamp (first 10 from rawdatacor) +SELECT id, unit_name, tool_name_id, event_timestamp, measurements +FROM rawdatacor +WHERE event_timestamp = '1970-01-01 00:00:00' +LIMIT 10;