I think following these 2 points is critical, or you will eventually end up with a big mess.
- Avoid models in migrations. Models will change, and your older migrations will break. Call
executewith raw SQL instead. - If you really really want to use models, you can define narrow-purpose models inside your migrations. Here’s a guide on this practice.