fix travis maybe, create extensions in the first migration, yolo
This commit is contained in:
parent
c0fb47b941
commit
1b6d5bcdd5
|
@ -15,12 +15,6 @@ addons:
|
||||||
packages:
|
packages:
|
||||||
- postgresql-10-postgis-2.5
|
- postgresql-10-postgis-2.5
|
||||||
|
|
||||||
before_script:
|
|
||||||
- psql -U postgres -c "CREATE ROLE bornhack WITH SUPERUSER LOGIN PASSWORD 'bornhack';"
|
|
||||||
- createdb -O bornhack bornhack
|
|
||||||
- psql -U postgres -c "CREATE EXTENSION postgis" bornhack
|
|
||||||
- psql -U postgres -c "CREATE EXTENSION btree_gist" bornhack
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install -r src/requirements/dev.txt
|
- pip install -r src/requirements/dev.txt
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.contrib.postgres.operations import BtreeGistExtension, CreateExtension
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +13,8 @@ class Migration(migrations.Migration):
|
||||||
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
|
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
|
BtreeGistExtension(),
|
||||||
|
CreateExtension("postgis"),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name="Camp",
|
name="Camp",
|
||||||
fields=[
|
fields=[
|
||||||
|
|
Loading…
Reference in a new issue