Integrations.type migration: 1 - Add new column with triggers

About

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

The goal of this step is to prepare a new column on integrations that will eventually become the STI column.

  • Add a type_new column to integrations.
  • Install database triggers that maintain integrations.type_new based on values present in integrations.type on any UPDATE/INSERT operation.

The values written to type_new should be mapped from "<integration name>Service" (their old model names) to "Integrations::<integration name>" (their new and existing model names).

Edited by Markus Koller