0

When I was developing with South I was able to use the --update flag for the schemamigration management command to refine the latest migration.

This was very convenient for iterative development. Is there an equivalent of the --update flag for Django>=1.7 native migrations?

dukebody
  • 7,025
  • 3
  • 36
  • 61

1 Answers1

1

According to the doumentation:

You are encouraged to make migrations freely and not worry about how many you have; the migration code is optimized to deal with hundreds at a time without much slowdown.

If you really want to get rid of your migrations as you develop I think your best bet is to squash them.

Sebastian Wozny
  • 16,943
  • 7
  • 52
  • 69
  • If only I could select which migrations to squash (from and to), instead of having to squash all migrations until the one selected... To me, it doesn't make sense to have 10 migration files generated while prototyping, while this could be reduced to one and be much cleaner. My current process for development is simply to migrate back, delete the last migration file and generate a new one. But it would be nicer if this was done automatically like in South with a flag. – dukebody May 28 '15 at 08:33
  • I agree. I'm looking forward to seeing a better option too. I wanted to have the reference to the documentation up here for the future though. – Sebastian Wozny May 28 '15 at 08:36
  • I've opened https://code.djangoproject.com/ticket/24870#ticket asking for this feature. – dukebody May 28 '15 at 14:01