charettes - Tue, 12 July 2022 at 13:11:14
> If you add fields to one your existing models the migration framework will
> add them at the end of your table as that's the most straightforward way of
> doing so. Of the top of my head only MySQL supports a syntax to add a
is it a correct takeaway,
I agree with Simon here. I don’t think Django should account for postgres
column order, especially when there’s no way to change column positions
other than by rebuilding the table. By the time you have enough data for
the space savings to be valuable, you probably need to use a careful
strategy to
Foreign keys are added at the end in cases where there are reference cycles
between models that must be broken. Instead of creating the column first
and then creating the foreign key constraint the migration framework opted
to combine both operations as it simplifies a few things.
If you add fi
hello there,
an interesting topic popped up on HN:
Column order in PostgreSQL does matter
https://news.ycombinator.com/item?id=32067473
I was wondering how django does this, so I looked at some of the sql
generated by migrations in my apps (particularly initial ones) and if I
read the SQL correc