Skip to content

Write a migration that deletes all existing campaigns/changesets when upgrading to 3.19

Created by: mrnugget

This depends on https://github.com/sourcegraph/sourcegraph/issues/12640 and whether we decide to do it or not.

If we decide we go with the "export & delete everything" option, we need a migration that deletes all campaigns and changesets that were created with the old campaigns workflow.

Something like this:

delete from campaigns where campaign_spec_id is null;
-- make campaigns.campaign_spec_id not nullable

delete from changesets where campaign_ids -- ... is empty