Explain the "why"

This commit is contained in:
Alexander Hess 2026-12-04 12:48:29 +01:00
commit bf2749cf61
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -96,7 +96,8 @@ class Address(meta.Base):
"-180 <= longitude AND longitude <= 180", "-180 <= longitude AND longitude <= 180",
name="longitude_between_180_degrees", name="longitude_between_180_degrees",
), ),
# Needed by a `ForeignKeyConstraint` in `AddressPixelAssociation` # The foreign key in `AddressPixelAssociation` refers to this pair
# => An `Address` can only be in `Pixel`s of its own `.city`
sa.UniqueConstraint("id", "city_id"), sa.UniqueConstraint("id", "city_id"),
# Covers the zip codes of the target cities Bordeaux, Lyon, and Paris # Covers the zip codes of the target cities Bordeaux, Lyon, and Paris
sa.CheckConstraint( sa.CheckConstraint(