1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed table cleanup in GIS migration tests

This commit is contained in:
Claude Paroz
2014-04-21 23:08:00 +02:00
parent 1667e736a7
commit ab90c4707b
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(