Thursday, October 30, 2014

Re: re-apply migrations on restored database

Hey Hector,

There is a database table called "django_migrations" that is used to keep track of the applied migrations. I guess it's not documented, because touching it shouldn't ever be necessary.

It would be interesting to see how you ended up in a state that Django thinks all migrations have been applied, though.

/Markus

On October 30, 2014 7:07:02 PM CET, "Héctor Urbina" <hurbinas@gmail.com> wrote:
Hello,

I'm working on a development branch for a django (1.7) project. I have a couple of migrations, including a data migration, in this branch; and I already applied the migrations. After that, I took a dump of the production database (which didn't have those migrations, of course) and restored it to use in development. So, first thing I need to do is to re-apply all the development migrations to the database "again", but django says "no migrations to apply".

I can't find in the documentation how is that django knows what migrations have been applied so far, or if there is a way of changing that, in order to re-apply them.

Any help would be appreciated,

Hector.

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

No comments:

Post a Comment