2

Migration creates the same auth structure for the two databases. On the default side is the default Django tables and on the other side are the same default django tables more the tables in the chosen template. Is this the trick?

DATABASES = {
    'default': {},
    'DB1': {}
}

Route doc link: https://docs.djangoproject.com/en/2.0/topics/db/multi-db/#topics-db-multi-db-routing

After migration:

manage.py migrate

manage.py migrate --database=DB1

Default tables:
- auth_group
- auth_group_permissions
- auth_permission
- auth_user
- auth_user_groups
- auth_user_user_permissions
- django_admin_log
- django_content_type
- django_migrations
- django_session


DB1 tables:
- auth_group
- auth_group_permissions
- auth_permission
- auth_user
- auth_user_groups
- auth_user_user_permissions
- django_admin_log
- django_content_type
- django_migrations
- django_session
- custom_table1
- custom_table2
- custom_table3
marcelo.delta
  • 2,730
  • 5
  • 36
  • 71

0 Answers0