Re: Encapsulating Complex Business Logic in a Migraiton

2017-08-30 Thread Antonis Christofides
Hello, Another option that might or might not work would be to violate the rule and do refer to "current" models during the migration to version X, but thereafter reset your migrations and only support migration to X+1 from X, not from earlier versions. This would need detailed release notes about

Re: Encapsulating Complex Business Logic in a Migraiton

2017-08-29 Thread James Schneider
On Tue, Aug 29, 2017 at 1:43 PM, Matt S wrote: > Standard practice is that you do not refer to "current" models (i.e. from > app.models import MyModel) in a migration as the migration will break when > that models changes. This means copying any model-specific code into the > migration. This beco

Re: Encapsulating Complex Business Logic in a Migraiton

2017-08-29 Thread Mike Dewhirst
On 30/08/2017 6:43 AM, Matt S wrote: Standard practice is that you do not refer to "current" models (i.e. from app.models import MyModel) in a migration as the migration will break when that models changes. This means copying any model-specific code into the migration. This becomes impractical

Encapsulating Complex Business Logic in a Migraiton

2017-08-29 Thread Matt S
Standard practice is that you do not refer to "current" models (i.e. from app.models import MyModel) in a migration as the migration will break when that models changes. This means copying any model-specific code into the migration. This becomes impractical when the code needed for the migration