Closed
Description
#780 introduced a check as to whether the default database's engine is spanner or not, and depending on that decides to override id generation with clientside uuid or not.
This fix is insufficient. It does improve the situation, as django-spanner will disable its monkeypatches if the default db is not spanner.
But the original issue #742 was talking about using multiple databases, where default
db is mysql. This is what django.db.connection.settings_dict
refers to. The correct key to check would be django.db.connections[???].settings_dict
.
Steps to reproduce
- set up spanner as a non-default database
- see that even running basic migrations against that non-default db fails, as the inserts into the
django_migrations
table already fail.
I'll investigate how to fix. It's likely something else has to be patched entirely.
Environment details
- Programming language: Python
- OS: Doesn't matter
- Language runtime version: 3.8
- Package version: master