mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
Fixed #26781 -- Made table name case change a noop on SQLite.
SQLite disgresses from the SQL standard by ignoring case of quoted identifiers. Thanks to laozzzi for the report and Tim for the review.
This commit is contained in:
parent
39805686b3
commit
c2e62fd1ae
5 changed files with 20 additions and 1 deletions
|
|
@ -825,6 +825,15 @@ class SchemaTests(TransactionTestCase):
|
|||
author_is_fk = True
|
||||
self.assertTrue(author_is_fk, "No FK constraint for author_id found")
|
||||
|
||||
def test_alter_db_table_case(self):
|
||||
# Create the table
|
||||
with connection.schema_editor() as editor:
|
||||
editor.create_model(Author)
|
||||
# Alter the case of the table
|
||||
old_table_name = Author._meta.db_table
|
||||
with connection.schema_editor() as editor:
|
||||
editor.alter_db_table(Author, old_table_name, old_table_name.upper())
|
||||
|
||||
def test_alter_implicit_id_to_explicit(self):
|
||||
"""
|
||||
Should be able to convert an implicit "id" field to an explicit "id"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue