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

This commit is contained in:
Thomas Schreiber 2013-12-31 03:31:21 +01:00 committed by Claude Paroz
parent 0b825adcf2
commit 7b119c1c77
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class PostGISCreation(DatabaseCreation):
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