|
I've noticed that with many triggers, if func is defined, the body of the func is baked into the migration file. I assume this triggers difference detection if the func is changed to generate a new migration when asked. I've made a custom trigger class and it implements get_func(self, model), as I need a reference to the model to customize the content. How does this interact with migrations? If someday I modified get_func(), would it generate a new migration? (It looks like it does not.) What is the right way to handle this? (I'm using 3.4.0 -- in process of moving from 2 to 3 before moving on to 4.) |
Replies: 3 comments 3 replies
|
If changes to |
|
Ok, with this version (4.11.1) it does detect get_func() content changes AND the func contents now get "baked" into the migration file as well. |
|
I really like the contents being in the migration file -- my func is generated dynamically and I can check what was generated. Thanks for this wonderful add on for us finicky django programmers! |
Ok, with this version (4.11.1) it does detect get_func() content changes AND the func contents now get "baked" into the migration file as well.