So,

I put this at the start of my router.py:

import logging
logger = logging.getLogger(__name__)

I have never used that, but I hope it is right.

Then below at the app's router and the allow_migrate def I did this:

 def allow_migrate(self, db, app_label, model_name=None, **hints):
        if app_label == 'app_name':
            logger.info("case A")
            return db == 'db_app_name'
        else:
            logger.info("case B")
            return None

Then I returned to the shell and I also reverted to the previous migration. 
Then I entered
python3 manage.py migrate app_name 
Operations to perform:
  Apply all migrations: app_name
Running migrations:
  Applying app_name.0037_auto_20230406_1837... OK

Again I turned to phpymadmin and saw that neither the apps db had changed 
or that there was an entry in app's db table for django_migrations. On the 
contrary there was a new entry in the django_migrations table of the 
default db.

Does this help?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a61b16c8-c9c9-42fb-94be-bb1d9be06ebfn%40googlegroups.com.

Reply via email to