fix travis maybe, create extensions in the first migration, yolo

This commit is contained in:
Thomas Steen Rasmussen 2020-07-12 23:04:13 +02:00
parent c0fb47b941
commit 1b6d5bcdd5
2 changed files with 3 additions and 6 deletions

View file

@ -15,12 +15,6 @@ addons:
packages:
- 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:
- pip install -r src/requirements/dev.txt

View file

@ -4,6 +4,7 @@
import uuid
from django.conf import settings
from django.contrib.postgres.operations import BtreeGistExtension, CreateExtension
from django.db import migrations, models
@ -12,6 +13,8 @@ class Migration(migrations.Migration):
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
operations = [
BtreeGistExtension(),
CreateExtension("postgis"),
migrations.CreateModel(
name="Camp",
fields=[