Skip to content

Commit

Permalink
fix migrations instructions for older docker
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierdalang committed Oct 26, 2018
1 parent 7c9338d commit e03f3f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/spcgeonode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ cd /path/to/SPCgeonode
docker exec -i spcgeonode_postgres_1 psql -U postgres -c "ALTER TABLE public.layers_layer DROP COLUMN service_id;"
# Migrate with fake initial
docker-compose -f docker-compose.yml run --rm --entrypoint "" django python manage.py migrate --fake-initial
docker-compose -f docker-compose.yml run --rm --entrypoint "python manage.py migrate --fake-initial" django
# Create the SQL diff to fix the schema # TODO : upstream some changes to django-extensions for this to work directly
docker-compose -f docker-compose.yml run --rm --entrypoint "" django /bin/sh -c "DJANGO_COLORS="nocolor" python manage.py sqldiff -ae" >> fix.sql
docker-compose -f docker-compose.yml run --rm --entrypoint '/bin/sh -c "DJANGO_COLORS=nocolor python manage.py sqldiff -ae"' django >> fix.sql
# Manually fix the SQL command until it runs (you can also drop the tables that have no model)
nano fix.sql
Expand Down

0 comments on commit e03f3f6

Please sign in to comment.