Open msorvoja opened 1 week ago
@Rikuoja Declaring geom field as geom = Column(Geometry(geometry_type="MULTIPOLYGON", srid=3067), nullable=True)
instead of geom: Mapped[Optional[MultiPolygon]]
fixed the problem where alembic forced the field to be non-nullable. A bug in alembic or geoalcemy2?
Fix #24
Still missing tests.
@Rikuoja One test fails since the revision file has been edited by hand. This is because alembic overwrites an optional field containing geometry to
nullable=False
. That won't do since the code list containing the names of the administrative regions must be loaded into the administrative_region code table before the geometries can be inserted. Hence, the geometry field is momentarily filled with NULL values.