tests/gis_tests/rasterapp/migrations/0001_setup_extensions.py
raw| 1 | from django.db import connection, migrations |
| 2 | |
| 3 | if connection.features.supports_raster: |
| 4 | from django.contrib.postgres.operations import CreateExtension |
| 5 | |
| 6 | class Migration(migrations.Migration): |
| 7 | operations = [ |
| 8 | CreateExtension("postgis_raster"), |
| 9 | ] |
| 10 | |
| 11 | else: |
| 12 | |
| 13 | class Migration(migrations.Migration): |
| 14 | operations = [] |