Skip to content

Drop old campaigns tables and add missing columns

Created by: mrnugget

This drops the following tables:

  • changeset_jobs
  • patches
  • patch_sets

Why drop them? Since we decided we're going to migrate existing campaigns into read-only versions and that we don't want to keep working state (changeset_jobs) around, it doesn't make sense to keep the tables. Why keep empty tables?

So, this removes the tables and all the code that depends on them.

It also does two other things:

  • Add a changeset_spec_id column to changesets (that's not yet read/written to in the campaigns.Store)
  • Add three diff_stat_* columns to changeset_specs, populate them when creating a new ChangesetSpec and reading/writing them in the campaigns.Store.

Why? Because I don't want to write another migration that adds diff stats to changeset specs in case those were created between the introduction of changeset specs and us adding the fields.

Merge request reports

Loading