mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #30943 -- Fixed postgres_tests on PostgreSQL 9.5.
Bloom extension is available on PostgreSQL 9.6+.
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| from unittest import mock | ||||
|  | ||||
| from django.db import migrations | ||||
| from django.db import connection, migrations | ||||
|  | ||||
| try: | ||||
|     from django.contrib.postgres.operations import ( | ||||
| @@ -23,7 +23,11 @@ except ImportError: | ||||
| class Migration(migrations.Migration): | ||||
|  | ||||
|     operations = [ | ||||
|         BloomExtension(), | ||||
|         ( | ||||
|             BloomExtension() | ||||
|             if getattr(connection.features, 'has_bloom_index', False) | ||||
|             else mock.Mock() | ||||
|         ), | ||||
|         BtreeGinExtension(), | ||||
|         BtreeGistExtension(), | ||||
|         CITextExtension(), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user