Re: Critical hints about Django migrations

2020-08-09 Thread Jure Erznožnik
It seems to me that article is written by a guy who has a lot of 
knowledge of the database engine and has some issues (mostly) with 
Django migrations system. His solution to the problem is to use direct 
SQL statements which of course can be more finely controlled than 
whatever Django creates.


While Django migrations really is a pain sometimes, it does 95% of work 
automatically and keeps you from worrying about schema changes that you 
made in your models. While I've been programming migrations by hand all 
my life before Django - and I DO see the advantages - I'm not sure I 
need those advantages. I could use some simplification and a bit less 
nitpicking, but I haven't yet encountered a need to hand code the 
migrations.


The rest of features Django doesn't have, I can use (and sometimes do) 
just the way he proposes: by simply defining them and having the DB 
server do it without Django's knowledge. So, no problem there...


So far Django has kept most of the DB issues I've been suffering from in 
the past away from me. And I'm quite happy to have them there. Away.


LP,
Jure

On 06/08/2020 21:27, Paolo Melchiorre wrote:

HI all,

I would suggest reading this interesting article by Daniele Varrazzo
(the maintainer of psycopg2 and creator of psycopg3) on Django
migrations.

It contains some criticisms but I also think some interesting hints
for improving Django ORM :
https://www.varrazzo.com/blog/2020/07/25/surviving-django/

See you,
Paolo



--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/d085e493-3ea8-c2bd-bcba-57107c39b7e2%40gmail.com.


Re: Critical hints about Django migrations

2020-08-06 Thread Andrew Godwin
While I agree with some of the author's points, I think a critical piece of 
context is that Django migrations are designed for the 90% case - i.e., people 
who just want something to work on a small scale and don't need to worry about 
many aspects of the database yet.

Like all parts of Django, it's designed to be progressively ignorable if you 
need to, and even deliberately includes a way to run SQL migrations (as the 
author suggests) complete with state tracking and no need to write a separate 
script, and is the intended approach for larger teams/codebases like the ones I 
work on. Migrations isn't meant to only be "makemigrations" and the model-based 
approach; there's also an underlying SQL application and dependency ordering 
engine that can be used standalone.

Andrew

On Thu, Aug 6, 2020, at 1:27 PM, Paolo Melchiorre wrote:
> HI all,
> 
> I would suggest reading this interesting article by Daniele Varrazzo
> (the maintainer of psycopg2 and creator of psycopg3) on Django
> migrations.
> 
> It contains some criticisms but I also think some interesting hints
> for improving Django ORM :
> https://www.varrazzo.com/blog/2020/07/25/surviving-django/
> 
> See you,
> Paolo
> 
> -- 
> Paolo Melchiorre
> 
> https://www.paulox.net
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/CAKFO%2Bx6_1qffQt56u58fNuAv6P6_kTkV258t-3ShCQNAkRXvKQ%40mail.gmail.com.
> 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b275d5cf-1405-43c5-8062-d15e5ff57507%40www.fastmail.com.


Critical hints about Django migrations

2020-08-06 Thread Paolo Melchiorre
HI all,

I would suggest reading this interesting article by Daniele Varrazzo
(the maintainer of psycopg2 and creator of psycopg3) on Django
migrations.

It contains some criticisms but I also think some interesting hints
for improving Django ORM :
https://www.varrazzo.com/blog/2020/07/25/surviving-django/

See you,
Paolo

-- 
Paolo Melchiorre

https://www.paulox.net

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAKFO%2Bx6_1qffQt56u58fNuAv6P6_kTkV258t-3ShCQNAkRXvKQ%40mail.gmail.com.