Review the ORM models and align the live database with them #16

Merged
alexander merged 10 commits from orm-review into develop 2026-12-01 23:06:04 +01:00
Showing only changes of commit b36a3d1cd6 - Show all commits

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.
Alexander Hess 2026-12-01 21:58:14 +01:00
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -32,7 +32,6 @@ class Grid(meta.Base):
side_length: orm.Mapped[int] = orm.mapped_column(
sa.SmallInteger,
nullable=False,
unique=True,
)
# Constraints