codeinsights: Isolate oobmigration
Created by: efritz
TL;DR: Multi-version upgrades require us to keep the oobmigration code around in-tree but frozen from external behavior changes, as we may have to run "old" code on instances coming up to speed. This PR moves the codeinsights oobmigration (recently deprecated) and removes all imports that are likely to change (excluding the stdlib and base db utils).
Original message: This PR isolates oobmigration #14 so that it does not need any behavioral imports that can change over time. This is in preparation for its deprecation, where it will run only as part of the migrator for historic upgrades. We want to freeze this migration as much as possible, because we want to treat it with consistent behavior over time to allow the migrator to make some assumptions (like the registered code for an oobmigration is valid at any point in its lifetime).
Fixes #38051 (closed). Fixes #40642 (closed).
Test plan
The current code in the PR has not been confidently tested yet. I plan to get a large data corpus from an old instance when insights values were still stored in site settings.
-
Add migration tests prior to merge