1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

Fixed #20968 -- Checked Spatialite metadata before migrations

Thanks Kenial S. Lee for the initial patch.
This commit is contained in:
Claude Paroz
2014-12-06 11:05:54 +01:00
parent e309135081
commit 307de67073
6 changed files with 24 additions and 45 deletions

View File

@@ -30,11 +30,3 @@ class SpatiaLiteCreation(DatabaseCreation):
style.SQL_FIELD(gqn(f.column)) + ');')
return output
def _create_test_db_pre_migrate_sql(self):
"""
Creates the spatial metadata tables.
"""
cur = self.connection._cursor()
arg = "1" if self.connection.features.supports_initspatialmetadata_in_one_transaction else ""
cur.execute("SELECT InitSpatialMetaData(%s)" % arg)