summaryrefslogtreecommitdiff
path: root/tests/bulk_create/models.py
diff options
context:
space:
mode:
authorDevilsAutumn <bhuvnesh875@gmail.com>2022-11-22 15:04:55 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-11-22 14:47:21 +0100
commit4035bab56f2862a25cd7bfba41a84e58672cb1cc (patch)
tree7bcf12adc5f6d48b6f9e687d431029e47667105d /tests/bulk_create/models.py
parent7d5329852f19c6ae78c6f6f3d3e41835377bf295 (diff)
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.
Diffstat (limited to 'tests/bulk_create/models.py')
-rw-r--r--tests/bulk_create/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/bulk_create/models.py b/tests/bulk_create/models.py
index 27abc416bd..8a21c7dfa1 100644
--- a/tests/bulk_create/models.py
+++ b/tests/bulk_create/models.py
@@ -69,6 +69,11 @@ class TwoFields(models.Model):
name = models.CharField(max_length=15, null=True)
+class FieldsWithDbColumns(models.Model):
+ rank = models.IntegerField(unique=True, db_column="rAnK")
+ name = models.CharField(max_length=15, null=True, db_column="oTheRNaMe")
+
+
class UpsertConflict(models.Model):
number = models.IntegerField(unique=True)
rank = models.IntegerField()