revert-multiple-cohorts: Add checks in code and a management command to ease the revert