Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

only attempt to create the postgis extension when it does not already…

… exist
  • Loading branch information...
commit 7b119c1c77c8e0d17b55088f83a1552c73ceb31c 1 parent 0b825ad
Thomas Schreiber authored claudep committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/gis/db/backends/postgis/creation.py
View
2  django/contrib/gis/db/backends/postgis/creation.py
@@ -89,7 +89,7 @@ def _create_test_db(self, verbosity, autoclobber):
self.connection.close()
self.connection.settings_dict["NAME"] = test_database_name
cursor = self.connection.cursor()
- cursor.execute("CREATE EXTENSION postgis")
+ cursor.execute("CREATE EXTENSION IF NOT EXISTS postgis")
cursor.connection.commit()
return test_database_name
Please sign in to comment.
Something went wrong with that request. Please try again.