-
Notifications
You must be signed in to change notification settings - Fork 33
Labels
api: spannerIssues related to the googleapis/python-spanner-sqlalchemy API.Issues related to the googleapis/python-spanner-sqlalchemy 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
Environment details
- Programming language: Python
- OS: Linux
- Language runtime version: 3.12.2
- Package version: 1.16.0
Steps to reproduce
Creating a table like:
CREATE TABLE composite_fk (
a STRING(MAX),
b STRING(MAX),
c STRING(MAX),
CONSTRAINT composite_fk FOREIGN KEY (a, b) REFERENCES composite_pk(a, b),
) PRIMARY KEY (a, b, c);
get_multi_foreign_keys returns referred_columns and constrained_columns in different orders.
I see {"referred_columns": ["b", "a"], "constrained_columns": ["a", "b"]}
This in turn affects alembic auto-generation, because it attempts to drop and recreate the foreign key which appears to have a different order than what I've defined.
#271 reports and #289 offers a fix for the constrained columns, but the referred columns are still effectively unordered.
Metadata
Metadata
Assignees
Labels
api: spannerIssues related to the googleapis/python-spanner-sqlalchemy API.Issues related to the googleapis/python-spanner-sqlalchemy 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.