correct check for missing date fields, correct migration script