[Feature Request] django-admin migrate - skip feature

65 views
Skip to first unread message

Fábio Molinar

unread,
Dec 20, 2018, 7:27:55 AM12/20/18
to Django developers (Contributions to Django itself)
Hi,

I have a project with two apps (app1, app2). App1's DB is the default DB. App2's DB is DB2. To run the migrations on DB2, I need to run:

python manage.py migrate app2 --database=DB2

Which is ok. The problem is to run the migrations for the rest of the project. I would like to run all migrations with the exception of app2's migrations on the default DB. To do that, I need to run every single app migration separately, with the exception of app2's migration. It would be great if I could type something like this instead:

python manage.py migrate --skip=app2

And that command would run all other migrations on the default DB with the exception of app2's migrations. 


And I hope this is the correct mail-list to ask for a feature.

Regards,
Fabio

Adam Johnson

unread,
Dec 20, 2018, 9:47:31 AM12/20/18
to django-d...@googlegroups.com
There's a new answer on your stack overflow post that I think answers your question: https://stackoverflow.com/a/53870659/1427135 . The database router can already do it :)

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/791a11e9-8848-4c96-a4b6-0c8bfcbf55cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Adam

Fábio Molinar

unread,
Dec 30, 2018, 4:45:26 PM12/30/18
to django-d...@googlegroups.com
Hi Adam,
Thank you for mentioning that. Someone has already posted an answer to my post which fixed my issue. In fact, it was my bad since I simply missed updating one of the methods of my router. 

You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/b5lNv_DjUpA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.

To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.

For more options, visit https://groups.google.com/d/optout.
--

Fábio Thomaz Molinar

Reply all
Reply to author
Forward
0 new messages