django-spanner's autofield generation does not work for non-default spanner DBs #783
Labels
api: spanner
Issues related to the googleapis/python-spanner-django API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
#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 whatdjango.db.connection.settings_dict
refers to. The correct key to check would bedjango.db.connections[???].settings_dict
.Steps to reproduce
django_migrations
table already fail.I'll investigate how to fix. It's likely something else has to be patched entirely.
Environment details
The text was updated successfully, but these errors were encountered: