Re: Looking for a code that separates fields while applying migrations

174 views
Skip to first unread message

Adam Johnson

unread,
Oct 2, 2023, 6:14:34 AM10/2/23
to django-d...@googlegroups.com

It steps through what has changed in the field and generates SQL for the database relevant changes, queueing up statements with self.execute. Any non-SQL changes are basically ignored.

Field.non_db_attrs tracks the field attributes rhat don’t affect SQL: https://github.com/django/django/blob/f4e72e6523e6968d9628dfbff914ab57dbf19e6b/django/db/models/fields/__init__.py#L142 . Note they may be modified by field subclasses, such as inDjango-MySQL’s EnumField.

On Sat, Sep 30, 2023, at 3:57 PM, Akash Sen wrote:
Hello everyone,
There are certain attributes in a field, after changing these the migration generated willbe applied to database, (for example take foreignkey) like null=True or db_default=1. As they have something to do with the database column.
There are some other attributes after changing these the migration generated will not be applied to database, like on_delete. As currently they have nothing to do with the database column.
In search of the code that takes care of that. Some help would be great!


--
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-develop...@googlegroups.com.

Akash Sen

unread,
Oct 3, 2023, 12:41:12 AM10/3/23
to Django developers (Contributions to Django itself)

Remy Lukoo Hangi

unread,
Nov 28, 2023, 11:22:37 AM11/28/23
to Django developers (Contributions to Django itself)
Fais-moi le setup.exe de python django suis débutant

Michiel Beijen

unread,
Nov 28, 2023, 4:09:00 PM11/28/23
to django-d...@googlegroups.com
On 28 Nov 2023, at 13:00, Remy Lukoo Hangi <remyluk...@gmail.com> wrote:
>
> Fais-moi le setup.exe de python django suis débutant
>

Hi Remy,

You found the developers email list for Django. Actually the email lists are not really used anymore, and you should use the ‘forums’ instead —> https://forum.djangoproject.com/c/users/6

However, there is no ‘setup.exe’ for Django, it does not really work that way. You’d be best off by reading the documentation here closely:
https://docs.djangoproject.com/en/4.2/intro/install/

Django is regarded as having good documentation and a comprehensive tutorial.

I hope this helps,


Michiel
Reply all
Reply to author
Forward
0 new messages