Description of problem: distro_activity can currently have distro_id nullable which would lead to orphaned activity items if a distro was deleted. Within the migration script a deletion of orphaned data could be required as there was the possibility of it to happen.
Ideas: * Change the column to be not nullable and run tests. * Fix the fallout. Will probably need a migration script. If it's too much, it's probably better to comment here.
Looking at a recent snapshot of our prod database: MySQL [beaker_dcallagh]> select count(*) from distro_activity where distro_id is null; +----------+ | count(*) | +----------+ | 0 | +----------+ 1 row in set (0.01 sec) So I am confident we have not had any bugs in the past which have allowed distro rows to be deleted or distro_activity rows to become orphaned. Therefore I think we can safely make distro_activity.distro_id non-NULLable.
https://gerrit.beaker-project.org/5956
There is no expected change in behaviour here, so verification should just be that the database migration succeeds (it did) and that nothing else breaks.
Beaker 25.0 has been released. Release notes are available upstream: https://beaker-project.org/docs/whats-new/release-25.html