From 85897db771bd3150d10ebb80cade909c69264ac0 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 11 Mar 2023 01:51:20 -0500 Subject: [PATCH] fix unlengthed string used as pk SQL Server has been failing on this test for a month as it does not allow a PK on VARCHAR(max) Change-Id: I3f43e660275e03ced1b584fe9d3c7f34f5558330 --- test/orm/inheritance/test_basic.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index 1a0fe1629e..99cfdc3837 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -4118,8 +4118,8 @@ class CompositeJoinedInTest(fixtures.DeclarativeMappedTest): class A(fixtures.ComparableEntity, Base): __tablename__ = "table_a" - order_id: Mapped[str] = mapped_column(primary_key=True) - _sku: Mapped[str] = mapped_column(primary_key=True) + order_id: Mapped[str] = mapped_column(String(50), primary_key=True) + _sku: Mapped[str] = mapped_column(String(50), primary_key=True) __mapper_args__ = { "polymorphic_identity": "a", @@ -4135,8 +4135,10 @@ class CompositeJoinedInTest(fixtures.DeclarativeMappedTest): class B(A): __tablename__ = "table_b" - _increment_id: Mapped[str] = mapped_column(primary_key=True) - _sku: Mapped[str] = mapped_column(primary_key=True) + _increment_id: Mapped[str] = mapped_column( + String(50), primary_key=True + ) + _sku: Mapped[str] = mapped_column(String(50), primary_key=True) __table_args__ = ( ForeignKeyConstraint( -- 2.47.2