We can safely merge and deploy this immediately because the *_ARCHIVE tables exist and have the right schema but are empty. As soon as these are populated, and the current tables no longer contain the full historical data, we should confirm that we have chosen an appropriate cutoff date.
This is a follow on from:
We can safely merge and deploy this immediately because the
*_ARCHIVE
tables exist and have the right schema but are empty. As soon as these are populated, and the current tables no longer contain the full historical data, we should confirm that we have chosen an appropriate cutoff date.The date is defined here: https://github.com/opensafely-core/ehrql/blob/88e870ab7a9dcea5b4398725d98b4ddfbc87a850/ehrql/backends/tpp.py#L208
We should check the min/max values over these columns:
And ensure that the cutoff date we've chosen falls safely inside the overlap of the date ranges.