1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

[1.7.x] Fixed table cleanup in GIS migration tests

Backport of ab90c4707b from master.
This commit is contained in:
Claude Paroz
2014-04-21 23:08:00 +02:00
parent 417e9f383f
commit 1d0f1ee199
2 changed files with 17 additions and 14 deletions

View File

@@ -5,7 +5,7 @@ from django.db.migrations.migration import Migration
from django.db.migrations.state import ProjectState
from django.db.models.fields import NOT_PROVIDED
from django.db.transaction import atomic
from django.db.utils import IntegrityError
from django.db.utils import IntegrityError, DatabaseError
from .test_base import MigrationTestBase
@@ -37,11 +37,11 @@ class OperationTests(MigrationTestBase):
with connection.cursor() as cursor:
try:
cursor.execute("DROP TABLE %s_pony" % app_label)
except:
except DatabaseError:
pass
try:
cursor.execute("DROP TABLE %s_stable" % app_label)
except:
except DatabaseError:
pass
# Make the "current" state
operations = [migrations.CreateModel(