You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-d...@googlegroups.com
Hey,
I've recently written an app that implements a closure tree using
views... and in order to make the migrations work as needed you must
manually add an entry to the migrations.
Another friend of mine, a recent django convert, was wanting a way to
add to the migration script generated when creating certain tables...
And today I realised I wanted quite involved control of how migration
actions are written for the idea I was working on...
What I conceived was what I call a MigrationAdapter, which controls at
least how create/modify/delete actions for a given object are generated.
I've started looking into the migrations code, and it appears the steps
are very much hard-coded [and, it appears, with much painfully learned
good reasons]...
Anyone with more familiarity with the migration machinery got input on
if this is feasible?
--
Curtis
Markus Holtermann
unread,
Feb 3, 2018, 8:00:06 AM2/3/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
What _could_ work, it's not more than idea w/o much thinking about it,
turning these function calls into a list or whatnot that you can inject
functions into that could do "stuff". Or create a dozen hooks that are
called before/after each of these steps.