Disallow NULL values in detected_at colum

Why are we doing this work?

After #336089 (closed) gets merged we need to disallow NULL values in the detected_at column

Implementation plan

Edited by Thiago Figueiró