diff --git a/tests/postgres_tests/migrations/0001_setup_extensions.py b/tests/postgres_tests/migrations/0001_setup_extensions.py
index 0915b74..d5ee4ee 100644
a
|
b
|
from __future__ import unicode_literals
|
4 | 4 | from django.contrib.postgres.operations import ( |
5 | 5 | HStoreExtension, UnaccentExtension, |
6 | 6 | ) |
7 | | from django.db import migrations |
| 7 | from django.db import connection, migrations |
8 | 8 | |
9 | 9 | |
10 | 10 | class Migration(migrations.Migration): |
… |
… |
class Migration(migrations.Migration):
|
15 | 15 | operations = [ |
16 | 16 | HStoreExtension(), |
17 | 17 | UnaccentExtension(), |
18 | | ] |
| 18 | ] if connection.vendor == 'postgresql' else '' |
diff --git a/tests/postgres_tests/migrations/0002_create_test_models.py b/tests/postgres_tests/migrations/0002_create_test_models.py
index c4f031f..2ec910e 100644
a
|
b
|
from __future__ import unicode_literals
|
3 | 3 | |
4 | 4 | import django.contrib.postgres.fields |
5 | 5 | import django.contrib.postgres.fields.hstore |
6 | | from django.db import migrations, models |
| 6 | from django.db import connection, migrations, models |
7 | 7 | |
8 | 8 | |
9 | 9 | class Migration(migrations.Migration): |
… |
… |
class Migration(migrations.Migration):
|
105 | 105 | options=None, |
106 | 106 | bases=None, |
107 | 107 | ), |
108 | | ] |
| 108 | ] if connection.vendor == 'postgresql' else [] |
109 | 109 | |
110 | 110 | pg_92_operations = [ |
111 | 111 | migrations.CreateModel( |
… |
… |
class Migration(migrations.Migration):
|
125 | 125 | ] |
126 | 126 | |
127 | 127 | def apply(self, project_state, schema_editor, collect_sql=False): |
128 | | PG_VERSION = schema_editor.connection.pg_version |
129 | | if PG_VERSION >= 90200: |
130 | | self.operations = self.operations + self.pg_92_operations |
| 128 | if connection.vendor == 'postgresql': |
| 129 | PG_VERSION = schema_editor.connection.pg_version |
| 130 | if PG_VERSION >= 90200: |
| 131 | self.operations = self.operations + self.pg_92_operations |
131 | 132 | return super(Migration, self).apply(project_state, schema_editor, collect_sql) |
diff --git a/tests/runtests.py b/tests/runtests.py
index b1cbed4..a7f5019 100755
a
|
b
|
def get_test_modules():
|
84 | 84 | os.path.isfile(f) or |
85 | 85 | not os.path.exists(os.path.join(dirpath, f, '__init__.py'))): |
86 | 86 | continue |
87 | | if not connection.vendor == 'postgresql' and f == 'postgres_tests' or f == 'postgres': |
88 | | continue |
89 | 87 | modules.append((modpath, f)) |
90 | 88 | return modules |
91 | 89 | |