[IMP] models._auto_init: avoid writing `False` default for boolean fields
Boolean fields always default to False in 8.0, even when they do not have explicit default values. This causes extra queries in the form: UPDATE <table> SET <bool_field> = false WHERE <bool_field> IS NULL; Those are not necessary as the ORM automatically folds NULL booleans to False, and can be very expensive on tables with several million rows, as the whole table may sometimes need to be rewritten (can take dozens of minutes)
Loading
Please register or sign in to comment