python - How to delete existing migrations in Django 1.7 -


so i'm following tango django guide, part 7.3.2. of tutorial. after ran command python3 manage.py makemigrations rango, won't let me re-populate database using populate script. instead got error: django.db.utils.operationalerror: no such column: rango_category.slug.

then, tried revert things normal deleting slug code (so before 7.3 of guide). made migration after doing so, because prior migration added slug category never deleted, can't use migrate command revert changes because throws error when tries migrate using old added category slug migration. when point newest migration, still gives me error old one.

then, in effort fix things, used bunch of different migrate , makemigrations commands, including --empty, --fake, squashmigrations etc , migrations unrecognizable. is there way delete these existing migrations , start clean slate?

this migrate --list looks now, reference:

admin [ ] 0001_initial auth [ ] 0001_initial rango [ ] 0001_squashed_0003_category_slug (3 squashed migrations) [ ] 0001_squashed_0005_auto_20150328_0917 (5 squashed migrations) contenttypes [ ] 0001_initial sessions [ ] 0001_initial

for clean start.

  • delete migrations folder inside rango
  • delete database created.then restart migration process

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -