summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-09-21 00:29:13 +0200
committerClaude Paroz <claude@2xlibre.net>2014-09-23 20:13:31 +0200
commit2a1bdf5ced3f22c2ff687afab45d811cfa555e74 (patch)
tree1ed30e4b2915e4763f88b02199cb470290209154 /django
parented297061a676e629983664031d77da1d0a70af7d (diff)
Called table_names instead of get_table_list in migrations
Diffstat (limited to 'django')
-rw-r--r--django/contrib/gis/tests/gis_migrations/test_commands.py4
-rw-r--r--django/db/migrations/executor.py2
-rw-r--r--django/db/migrations/recorder.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/gis/tests/gis_migrations/test_commands.py b/django/contrib/gis/tests/gis_migrations/test_commands.py
index 404469f7ea..ebcf6eecd5 100644
--- a/django/contrib/gis/tests/gis_migrations/test_commands.py
+++ b/django/contrib/gis/tests/gis_migrations/test_commands.py
@@ -21,11 +21,11 @@ class MigrateTests(TransactionTestCase):
def assertTableExists(self, table):
with connection.cursor() as cursor:
- self.assertIn(table, connection.introspection.get_table_list(cursor))
+ self.assertIn(table, connection.introspection.table_names(cursor))
def assertTableNotExists(self, table):
with connection.cursor() as cursor:
- self.assertNotIn(table, connection.introspection.get_table_list(cursor))
+ self.assertNotIn(table, connection.introspection.table_names(cursor))
@override_system_checks([])
@override_settings(MIGRATION_MODULES={"gis": "django.contrib.gis.tests.gis_migrations.migrations"})
diff --git a/django/db/migrations/executor.py b/django/db/migrations/executor.py
index 503ccddc95..6ebb21fc0b 100644
--- a/django/db/migrations/executor.py
+++ b/django/db/migrations/executor.py
@@ -149,7 +149,7 @@ class MigrationExecutor(object):
# We have to fetch the model to test with from the
# main app cache, as it's not a direct dependency.
model = global_apps.get_model(model._meta.swapped)
- if model._meta.db_table not in self.connection.introspection.get_table_list(self.connection.cursor()):
+ if model._meta.db_table not in self.connection.introspection.table_names(self.connection.cursor()):
return False
found_create_migration = True
# If we get this far and we found at least one CreateModel migration,
diff --git a/django/db/migrations/recorder.py b/django/db/migrations/recorder.py
index 57ceb8da03..923048f58d 100644
--- a/django/db/migrations/recorder.py
+++ b/django/db/migrations/recorder.py
@@ -46,7 +46,7 @@ class MigrationRecorder(object):
"""
# If the table's there, that's fine - we've never changed its schema
# in the codebase.
- if self.Migration._meta.db_table in self.connection.introspection.get_table_list(self.connection.cursor()):
+ if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
return
# Make the table
with self.connection.schema_editor() as editor: