Jan Musílek
unread,Aug 23, 2018, 7:30:33 AM8/23/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hi!
I have a problem with migrations workflow for which I couldn't find an
answer anywhere else.
Suppose, that I have an application MYAPP, that uses some third-party
apps. These third-party apps require running `makemigrations` command
after adding them to INSTALLED_APPS, because their migrations depend on
settings and therefore can't be distributed right away.
I.e. take `django-modeltranslation` whose migrations depends on
`LANGUAGES` setting or `django-money` whose migrations depends on
`CURRENCIES` setting.
If I was the only user of MYAPP, I would just generate these migrations
depending on my settings and that would be it. What's important that
these migrations belong to application MYAPP, not to third-party apps.
But, I also want to distribute my application MYAPP to other users. I
don't know what they settings will look like, so they'll also need to
generate their own migrations.
Now, I release new version of MYAPP. This version may contain some MYAPP
models related migrations. How should the other users proceed to upgrade
MYAPP to new version and still retain their settings-dependent migrations?
Is there any straightforward elegant solution? Or at least some
nasty/ugly agreed upon "standard" solution? I can't believe that I'm the
only one who has this problem.
Regards,
JM