Fix deletion of expired ChangesetSpecs
Created by: mrnugget
The comments in the code explain what was wrong before:
- We tried to delete
CampaignSpecs
before theChangesetSpecs
, which would lead to a foreign key constraint violation. - We expired
ChangesetSpecs
that were still attached to aChangeset
, either as thePreviousSpec
or theCurrentSpec
.
This commit fixes both issues and fixes #12763.