Better HN
topnewbestaskshowjobs
Log inSign up

MythicDev

1 karma · joined Aug 8, 2020 (6y ago) · 3 submissions

Submissions

1.

Regex matching through a base64 encoding layer(pypi.org ↗)

1 points · by MythicDev · 3y ago · discuss

2.

A Python library for importing code directly from GitHub Copilot(github.com ↗)

1 points · by MythicDev · 5y ago · discuss

comment 6y ago · link · parent

As far as I know, this is by design; your migrations are supposed to operate on a frozen state of what your models and code _were at a point in time_.

If you would rely on code outside of said migration, you would be breaching that frozen state and potentially end up with unintended side-effects (e.g. running a migration created 2 years ago that imports your code that changed today). This is why you might have to sometimes copy-paste logic to your python migrations, but you also guarantee that the migration always runs the same way.