1. from unittest import mock
    
  2. 
    
  3. from django.db import migrations
    
  4. 
    
  5. try:
    
  6.     from django.contrib.postgres.operations import CryptoExtension
    
  7. except ImportError:
    
  8.     CryptoExtension = mock.Mock()
    
  9. 
    
  10. 
    
  11. class Migration(migrations.Migration):
    
  12.     # Required for the SHA database functions.
    
  13.     operations = [CryptoExtension()]