Integrations.type migration: 4 - Change the application to use `type_new` instead of `type`, and ignore `type`

About

This issue is part of &6177 (closed). See that Epic for a broader description of the feature.

This step is to:

  • Change the application to use the data in integrations.type_new by setting the inheritance_column.
  • Mark type as ignore, as the first step to its removal.

Availability & Testing

Thoughts: this should be covered with existing specs.

Development plan

We need to implement this issue in a number of steps to deal with mixed-version deployments. The stages are:

  • !80560 (merged) %14.8 (333508-ajk-use-type-new-indices): Ensures we have the correct indices on integrations.type_new
  • !80537 (merged) %14.8 (333508-integrations-type-new-trigger-null-safe): Updates the DB trigger so that when we stop writing to integrations.type and start writing to integrations.type_new the application functions correctly. Also allows for rollback without data loss.
  • !80065 (merged) %14.9 (333508-ajk-use-type-new): Switches the STI column to integrations.type_new. Ignores integrations.type.

In a subsequent release:

  • !80562 (merged) %15.0 (333508-ajk-use-type-new-b): Clean-up, removes integrations.type and unnecessary files/migrations/specs.
Edited by Alex Kalderimis