Skip to content

Remove worker version FKs on ML results

https://redmine.teklia.com/issues/10463

Requires #1903 (closed)

Now that all ML results with worker versions have a worker run set, we can remove the duplicate data. All six worker_version foreign keys should be removed, along with the worker_run_and_worker_version check constraints. This is likely to have a significant impact on the code base as we were still filtering by worker_version_id to avoid one extra SQL join and to support older ML results.

With this update, the arkindex generate_missing_worker_runs command should be removed as it can only be executed in the context of the migrations. Running the command itself will try to use the models that no longer have the worker_version fields, so it will crash.

Edited by Erwan Rouchet