1
0
mirror of https://github.com/django/django.git synced 2025-03-13 10:50:55 +00:00

15 Commits

Author SHA1 Message Date
Simon Charette
4608d34b34 Fixed #36088 -- Avoided unnecessary DEFAULT usage on bulk_create().
When all values of a field with a db_default are DatabaseDefault, which
is the case most of the time, there is no point in specifying explicit
DEFAULT for all INSERT VALUES as that's what the database will do anyway
if not specified.

In the case of PostgreSQL doing so can even be harmful as it prevents
the usage of the UNNEST strategy and in the case of Oracle, which
doesn't support the usage of the DEFAULT keyword, it unnecessarily
requires providing literal db defaults.

Thanks Lily Foote for the review.
2025-02-01 18:43:10 +01:00
DevilsAutumn
4035bab56f Fixed #34171 -- Fixed QuerySet.bulk_create() on fields with db_column in unique_fields/update_fields.
Bug in 0f6946495a8ec955b471ca1baaf408ceb53d4796.

Thanks Joshua Brooks for the report.
2022-11-22 14:47:21 +01:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
sean_c_hsu
0f6946495a Fixed #31685 -- Added support for updating conflicts to QuerySet.bulk_create().
Thanks Florian Apolloner, Chris Jerdonek, Hannes Ljungberg, Nick Pope,
and Mariusz Felisiak for reviews.
2022-01-19 20:17:42 +01:00
Mariusz Felisiak
d992f4e3c2 Refs #31369 -- Removed models.NullBooleanField per deprecation timeline. 2021-01-14 17:50:04 +01:00
Hans Aarne Liblik
a21f7b91db Fixed #31301 -- Fixed crash of QuerySet.bulk_create() with mixed empty and set ForeignKeys to AutoFields on Oracle. 2020-02-28 12:56:03 +01:00
Caio Ariede
555bebe774 Fixed #30987 -- Added models.PositiveBigIntegerField. 2019-11-19 09:34:11 +01:00
Tim Graham
5fa4f40f45 Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Mariusz Felisiak
dc811cf503 Refs #22144 -- Added test for QuerySet.bulk_create() with long non-ASCII text. 2017-02-24 10:54:10 -05:00
Vytis Banaitis
3effe3a9c6 Refs #22669 -- Fixed bulk_create test if Pillow isn't installed. 2017-02-13 08:58:10 -05:00
Mikhail Nacharov
c4e2fc5d98 Fixed #22669 -- Fixed QuerySet.bulk_create() with empty model fields on Oracle. 2017-02-09 18:47:08 -05:00
Tim Graham
7a5b7e35bf Fixed #22705 -- Fixed QuerySet.bulk_create() on models without any fields on Oracle.
Fixed on other backends by 134ca4d438bd7cbe8f0f287a00d545f96fa04a01.

Thanks Mariusz Felisiak for the solution.
2015-10-09 14:16:06 -04:00
William Schwartz
9a5cfa05a0 Fixed #24997 -- Enabled bulk_create() on proxy models 2015-07-02 13:53:51 -04:00
Jason Myers
7a61c68c50 PEP8 cleanup
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:50:49 -05:00
Florian Apolloner
89f40e3624 Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00