From b36a3d1cd638ae9ff97691a86295c881dfbc190a Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Tue, 1 Dec 2026 21:58:14 +0100 Subject: [PATCH] Allow the same `Grid.side_length` across cities The `unique=True` on `Grid.side_length` made the side length unique across all cities. The intended rule is the `UniqueConstraint("city_id", "side_length")`, which the migrations already implement; so, no migration is needed. --- src/velofy/db/grids.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/velofy/db/grids.py b/src/velofy/db/grids.py index 365f7c0..b6a3256 100644 --- a/src/velofy/db/grids.py +++ b/src/velofy/db/grids.py @@ -32,7 +32,6 @@ class Grid(meta.Base): side_length: orm.Mapped[int] = orm.mapped_column( sa.SmallInteger, nullable=False, - unique=True, ) # Constraints