-- DRY RUN: Shows what would be deleted without actually deleting
-- Run this first to verify what will be removed

-- Show text records that would be deleted
SELECT 
    'Text records that would be deleted' as table_name,
    COUNT(*) as count,
    MIN(actualized_at) as earliest_date,
    MAX(actualized_at) as latest_date
FROM vgate.text 
WHERE actualized_at < '2024-09-13 00:00:00+00';

-- Show some sample text records that would be deleted
SELECT 
    id,
    label,
    actualized_at,
    created_at,
    updated_at
FROM vgate.text 
WHERE actualized_at < '2024-09-13 00:00:00+00'
ORDER BY actualized_at DESC
LIMIT 10;

-- Show translation records that would be deleted
SELECT 
    'Translation records that would be deleted' as table_name,
    COUNT(*) as count
FROM vgate.translation t
WHERE t.text_id IN (
    SELECT id FROM vgate.text 
    WHERE actualized_at < '2024-09-13 00:00:00+00'
);

-- Show some sample translation records that would be deleted
SELECT 
    t.id,
    t.text_id,
    t.language_id,
    t.country_id,
    t.content,
    t.type,
    t.created_at,
    t.updated_at
FROM vgate.translation t
WHERE t.text_id IN (
    SELECT id FROM vgate.text 
    WHERE actualized_at < '2024-09-13 00:00:00+00'
)
ORDER BY t.created_at DESC
LIMIT 10;

