diff --git a/conftest.py b/conftest.py index 5d78f12b2..6e75b4b2a 100644 --- a/conftest.py +++ b/conftest.py @@ -33,7 +33,7 @@ def pytest_configure(config): pass if config.getoption('postgres'): - os.environ['DATABASE_ENGINE'] = 'django.db.backends.postgresql_psycopg2' + os.environ['DATABASE_ENGINE'] = 'django.db.backends.postgresql' # Setup django after processing the pytest arguments so that the env # variables are available in the settings diff --git a/docs/advanced_topics/settings.rst b/docs/advanced_topics/settings.rst index cd3ffdc30..060183081 100644 --- a/docs/advanced_topics/settings.rst +++ b/docs/advanced_topics/settings.rst @@ -558,7 +558,7 @@ These two files should reside in your project directory (``myproject/myproject/` DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'myprojectdb', 'USER': 'postgres', 'PASSWORD': '', diff --git a/runtests.py b/runtests.py index 629ca118a..140c82478 100755 --- a/runtests.py +++ b/runtests.py @@ -47,7 +47,7 @@ def runtests(): pass if args.postgres: - os.environ['DATABASE_ENGINE'] = 'django.db.backends.postgresql_psycopg2' + os.environ['DATABASE_ENGINE'] = 'django.db.backends.postgresql' if args.elasticsearch: os.environ.setdefault('ELASTICSEARCH_URL', 'http://localhost:9200') diff --git a/wagtail/contrib/postgres_search/backend.py b/wagtail/contrib/postgres_search/backend.py index c8894142b..a824a5ef6 100644 --- a/wagtail/contrib/postgres_search/backend.py +++ b/wagtail/contrib/postgres_search/backend.py @@ -168,10 +168,10 @@ class Index(object): obj._object_id = force_text(obj.pk) obj._body_ = self.prepare_body(obj) connection = connections[self.db_alias] - if connection.pg_version >= 90500: # PostgreSQL >= 9.5 - self.add_items_upsert(connection, content_type_pk, objs, config) - else: - self.add_items_update_then_create(content_type_pk, objs, config) + # if connection.pg_version >= 90500: # PostgreSQL >= 9.5 + # self.add_items_upsert(connection, content_type_pk, objs, config) + # else: + self.add_items_update_then_create(content_type_pk, objs, config) def __str__(self): return self.name