WIP - import_whitebox_model improvements

Description

In #392 (closed), we want to improve plugin models to support foreign keys to other plugins' models. Currently, the import_whitebox_model wrapper does not play well with migrations, and there are a lot of unknowns that need to be figured out:

  • How should foreign keys even work
  • Should they be DB enforced or not
  • If DB enforced, what happens when a plugin is not loaded/removed
  • If not DB enforced, should there be some kind of Whitebox-specific mechanism for handling missing relations
  • How should eventual replacements work
    • Specific implementation details are out of scope, but investigation of overall constraints around replacement, deprecation, migration are within scope
  • How should all this be represented in migrations

Scope

  • WIP, possibly a POC - two phases

MRs

Edited by Milos