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 >> >> <https://groups.google.com/d/msgid/django-developers/12539052-6e21-491a-b79e-e63edf451165n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> >> -- 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.