How to move a model to a plugin?

Hi,

To help customising and make strapi “cleaner”, we’re trying to move the entities (that we created “normally”) into specific plugins.

Moving the json schema file worked mostly fine… until it was a content type that was referenced by another content type

and now strapi doesn’t start anymore.

We went back to a previous version, but is there a way to migrate models in a slightly safer way?