diff options
Diffstat (limited to 'tests/modeltests/custom_pk/models.py')
-rw-r--r-- | tests/modeltests/custom_pk/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/modeltests/custom_pk/models.py b/tests/modeltests/custom_pk/models.py index 6193852adf..f7b790ca21 100644 --- a/tests/modeltests/custom_pk/models.py +++ b/tests/modeltests/custom_pk/models.py @@ -8,7 +8,8 @@ this behavior by explicitly adding ``primary_key=True`` to a field. from django.db import models class Employee(models.Model): - employee_code = models.CharField(maxlength=10, primary_key=True) + employee_code = models.CharField(maxlength=10, primary_key=True, + db_column = 'code') first_name = models.CharField(maxlength=20) last_name = models.CharField(maxlength=20) class Meta: |