Fixed #29949 -- Refactored db introspection identifier converters.

Removed DatabaseIntrospection.table_name_converter()/column_name_converter()
and use instead DatabaseIntrospection.identifier_converter().

Removed DatabaseFeatures.uppercases_column_names.

Thanks Tim Graham for the initial patch and review and Simon Charette
for the review.
This commit is contained in:
Mariusz Felisiak 2018-11-21 09:06:50 +01:00 committed by GitHub
parent 2e4776196d
commit d5f4ce9849
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 64 additions and 76 deletions

View file

@ -48,8 +48,6 @@ class CheckConstraintTests(TestCase):
def test_name(self):
constraints = get_constraints(Product._meta.db_table)
expected_name = 'price_gt_discounted_price'
if connection.features.uppercases_column_names:
expected_name = expected_name.upper()
self.assertIn(expected_name, constraints)
@ -87,6 +85,4 @@ class UniqueConstraintTests(TestCase):
def test_name(self):
constraints = get_constraints(Product._meta.db_table)
expected_name = 'unique_name'
if connection.features.uppercases_column_names:
expected_name = expected_name.upper()
self.assertIn(expected_name, constraints)