Closed uzihs closed 8 years ago
I'm not entirely sure this is the right solution. On one hand, the migrations should have what they need to reconstruct a Field at any point in time. But this is a legitimate issue, and keys probably shouldn't be checked in to version control. I wonder if manually editing the migrations after you make them to use settings (or read from a file/environment, or however you're setting them) would work - it's a similar problem to third party app using AUTH_USER_MODEL and having to manually update the migrations.
In any case, I've stopped including the key in migrations for now. Would you mind making sure this solves your issue?
When you use different keys for development and production environments, running migrate in the production environment fails since Django migration identify a change in the schema that is not represented in the migrations.