1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #32158 -- Fixed loaddata crash on SQLite when table/column names are SQL keywords.

This commit is contained in:
Chinmoy Chakraborty
2020-12-28 11:15:48 +05:30
committed by Mariusz Felisiak
parent 89fc144ded
commit 270072c4c2
3 changed files with 28 additions and 4 deletions

View File

@@ -140,3 +140,11 @@ class Author(models.Model):
class Book(models.Model):
author = models.ForeignKey(Author, models.CASCADE, to_field='name')
class SQLKeywordsModel(models.Model):
id = models.AutoField(primary_key=True, db_column='select')
reporter = models.ForeignKey(Reporter, models.CASCADE, db_column='where')
class Meta:
db_table = 'order'