Hello Marcin,

I assume you're writing to this list because you would like other Django 
contributors to cooperate in order to fix this issue. Starting with "There is a 
huge issue with content types framework" isn't a good way to motivate them.

Speaking for myself, I would be more eager to investigate if you skipped the 
hyperbole and remained neutral, for example "I'm facing an issue with the 
content types framework".

Many of your messages on this mailing list contain strongly negative or 
passive-aggressive comments. They get in the way of communicating your ideas. 
You'd have more success if you managed to write in a positive style.

I think the issue itself is valid. I may have hit it before and worked around 
it, likely be executing a subset of migrations to trigger creation of content 
types, then executing the rest of the migrations. Django could probably do 
better.

Best regards,

-- 
Aymeric.



> On 3 Oct 2018, at 13:01, Marcin Nowak <marcin.j.no...@gmail.com> wrote:
> 
> Hello.
> 
> There is a huge issue with content types framework. The data is loaded after 
> every migration (post_migrate signal) automatically, and this approach is 
> against db data consistency.
> The biggest problem is with data migrations, which are applied at the first 
> time (on clean database). Any data migration which depends on some content 
> types will not insert the data.
> 
> The sequence looks like this:
> create db
> insert into auth_permission ...  inner join django_content_type ...
> post migrate: insert into django_content_type ...
> 
> Two things are wrong:
> automatic creation of content types
> creation of content types after running migrations
> Solution:
> creation of new app should add very first migration, which will add entry to 
> the content types
> create_contentypes handler should be removed from post_migrate signal
> Any data migration, which depends on some content types, should be declared 
> with proper dependency. This will guarantee existence of the required content 
> type entry.
> 
> 
> BR,
> Marcin
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-developers+unsubscr...@googlegroups.com 
> <mailto:django-developers+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-developers@googlegroups.com 
> <mailto:django-developers@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-developers 
> <https://groups.google.com/group/django-developers>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/8869b1cb-2b92-4e05-823a-92e72308fc23%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-developers/8869b1cb-2b92-4e05-823a-92e72308fc23%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/612A03B5-ACF3-4245-95C5-55C90245DCB8%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to