django/tests/gis_tests/gis_migrations/migrations/0001_setup_extensions.py

15 lines
352 B
Python

from django.db import connection, migrations
if connection.features.supports_raster:
from django.contrib.postgres.operations import CreateExtension
class Migration(migrations.Migration):
operations = [
CreateExtension("postgis_raster"),
]
else:
class Migration(migrations.Migration):
operations = []