Friday, December 9, 2016

RE: Drawback of delete all migrations file

If you made any of your customizations to the migrations files, then you will lose that information.

 

You may want to consider using Django's dumpdata management command to save all the data on your production database (and loaddata to restore it).

https://docs.djangoproject.com/en/1.10/ref/django-admin/#dumpdata

 

Otherwise, flush away.  During the development of my project, at least at the beginning, I always deleted all of the migration files until I settled on a model that worked for me and I started adding my own customizations to them.

 

 

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Sylvain Dégué
Sent: Friday, December 9, 2016 12:40 PM
To: Django users
Subject: Drawback of delete all migrations file

 

Im about to lauch a project that uses django for the api. So im only using the admin side for now. Ive been having problem concerning the database and forms.

Ive made many mistake while updating the database, when certain field didnt allow null. It caused IntegrityError, which I was able to fix

 

SO im thinking about reset completly my production database and remove all the migrations to start fresh. I dont have much data in the production database so its probably the best time.

 

 

Is there any drawback to flushing the database and removing the migrations files 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bff6a050-8a28-48f4-abf2-57f17c3c8a04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment