Thursday, October 30, 2014

Re: re-apply migrations on restored database

a ha!

I see the table on the restored database. I always though that running the dump.sql would build an exact copy of the original database, but now I'm thinking it just drops and rebuilds the existing original tables. I will manually drop my dev database and then restore the dump again... and see what happens...

Thanks,
H.

2014-10-30 15:14 GMT-03:00 Markus Holtermann <info@markusholtermann.eu>:
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.



--
Héctor Urbina S.
Ingeniero en Bioinformática
Fono: 82049138

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADHcORiTRXK7RMWvgRXf4Fvqpekw5kryN0tKqyh977wqWdfzqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment