Nothing helps till now !! Thanks, Priyanka
On Tuesday, 6 June 2017 12:22:00 UTC+5:30, Priyanka Thakur wrote: > > Hi, > > I am migrating from Django 1.7.4 to Django 1.10.0 and is facing issue > while running migrations. > > I am running the comand : python manage.py makemigrations <app_name> > > Scenario, is that we araccessing model from Oracle database, for which I > don't have read/write permissions and i had to change the model definition > in local source to add related_name . > > I want to skip/exclude this model while running makemigrations, but is not > able to do so. > > I tried returning "False" in the router, but that also is not working. > > Please suggest solution/workaround. Also, please feel free to correct me , > if I'm wrong. > > Data : > > > Model : > > With Django 1.7: > > class PartVersionTree(models.Model): > > fk_partversion = models.ForeignKey(PartVersion, null=True, > blank=True,db_column='FK_PARTVERSION') > > fk_associatedpartversion = models.ForeignKey(PartVersion, null=True, > blank=True,db_column='FK_ASSOCIATEDPARTVERSION') > > > > Changed in Django 1.10: > > > class PartVersionTree(models.Model): > fk_partversion = models.ForeignKey(PartVersion, null=True, > blank=True,db_column='FK_PARTVERSION', related_name = > '%(class)s_fk_partversion') > > fk_associatedpartversion = models.ForeignKey(PartVersion, null=True, > blank=True,db_column='FK_ASSOCIATEDPARTVERSION', related_name = > '%(class)s_fk_associatedpartversion') > > > > > Router definition: > > > def allow_migrate(self, db, app_label, model_name=None, **hints): > > return False > > > Regards, > Priyanka > -- 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+unsubscr...@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/a73f46e8-69bc-4db5-9883-bc93376628d4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.