summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2016-06-21 00:01:03 -0400
committerSimon Charette <charette.s@gmail.com>2016-06-21 16:38:00 -0400
commit23ac35af19face4ad0b466f5aaffafd5db98db0e (patch)
tree31c4bcb9bf82fd85196ac9a78b1dd84a1995474a /tests
parent1b0b6f0342e5ac9e3e789ca522ad64a532602c3f (diff)
[1.10.x] 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. Backport of c2e62fd1aed093c4d9ff84e3d86e6a85c8aa1917 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/schema/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index b0d5b407ac..8b35b77c7b 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -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"