diff --git a/django/contrib/postgres/operations.py b/django/contrib/postgres/operations.py
index 3bb81dc..8db9a2a 100644
a
|
b
|
class CreateExtension(Operation):
|
14 | 14 | def database_forwards(self, app_label, schema_editor, from_state, to_state): |
15 | 15 | if schema_editor.connection.vendor != 'postgresql': |
16 | 16 | return |
17 | | schema_editor.execute("CREATE EXTENSION IF NOT EXISTS %s" % self.name) |
| 17 | schema_editor.execute("CREATE EXTENSION IF NOT EXISTS \"%s\"" % self.name) |
18 | 18 | |
19 | 19 | def database_backwards(self, app_label, schema_editor, from_state, to_state): |
20 | | schema_editor.execute("DROP EXTENSION %s" % self.name) |
| 20 | schema_editor.execute("DROP EXTENSION \"%s\"" % self.name) |
21 | 21 | |
22 | 22 | def describe(self): |
23 | 23 | return "Creates extension %s" % self.name |
diff --git a/tests/postgres_tests/migrations/0001_setup_extensions.py b/tests/postgres_tests/migrations/0001_setup_extensions.py
index ad5d1c7..3ecdb68 100644
a
|
b
|
from django.db import migrations
|
5 | 5 | |
6 | 6 | try: |
7 | 7 | from django.contrib.postgres.operations import ( |
8 | | HStoreExtension, UnaccentExtension, |
| 8 | CreateExtension, HStoreExtension, UnaccentExtension, |
9 | 9 | ) |
10 | 10 | except ImportError: |
11 | 11 | from django.test import mock |
… |
… |
class Migration(migrations.Migration):
|
19 | 19 | ] |
20 | 20 | |
21 | 21 | operations = [ |
| 22 | CreateExtension('uuid-ossp'), |
22 | 23 | HStoreExtension(), |
23 | 24 | UnaccentExtension(), |
24 | 25 | ] |