mirror of
https://github.com/django/django.git
synced 2025-09-30 14:01:21 +00:00
only attempt to create the postgis extension when it does not already exist
This commit is contained in:
parent
0b825adcf2
commit
7b119c1c77
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue