marcus-s
10/25/2016 - 1:14 PM

How to reset an app with an existing migration in production on postgres. Had a problem where I deployed a project with a new app with an i

How to reset an app with an existing migration in production on postgres.

Had a problem where I deployed a project with a new app with an initial migration. Then changed the migration in dev. Then redeployed with a different initial migration.

psql -h 999.999.99.99 -U web_forms web_forms
web_forms=> SELECT * from django_migrations;
web_forms=> DELETE FROM django_migrations WHERE id=28;
web_forms=> DROP TABLE room_change_request_type;
# drop all tables from that app
web_forms=> \q
./manage.py migrate