-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
api: spannerIssues related to the googleapis/python-spanner-django API.Issues related to the googleapis/python-spanner-django API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
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
Metadata
Metadata
Assignees
Labels
api: spannerIssues related to the googleapis/python-spanner-django API.Issues related to the googleapis/python-spanner-django API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.