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

2023-11-28 Thread Remy Lukoo Hangi
Fais-moi le setup.exe de python django suis débutant

Le mardi 3 octobre 2023 à 06:41:12 UTC+2, Akash Sen a écrit :

> This one worked :   SQL: 
> https://github.com/django/django/blob/f4e72e6523e6968d9628dfbff914ab57dbf19e6b/django/db/models/fields/__init__.py#L142
>  .
> Thank you Adam.
>
> On Monday, October 2, 2023 at 3:44:34 PM UTC+5:30 Adam Johnson wrote:
>
>> See alte_field in the schema editor: 
>> https://github.com/django/django/blob/f4e72e6523e6968d9628dfbff914ab57dbf19e6b/django/db/backends/base/schema.py#L811
>>
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/12539052-6e21-491a-b79e-e63edf451165n%40googlegroups.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/b624ee4c-e081-47c7-a227-7fe17e80d46en%40googlegroups.com.


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

2023-11-28 Thread Michiel Beijen
On 28 Nov 2023, at 13:00, Remy Lukoo Hangi  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

-- 
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/C1B2781F-0374-4B72-87FA-324B33343C8C%40x14.nl.