From 5745c1df12cb7861f7f5ce814890c96a5e7e5d33 Mon Sep 17 00:00:00 2001 From: Margriet Palm Date: Thu, 5 Dec 2024 09:06:56 +0100 Subject: [PATCH] Remove foreign key requirements that were missed before --- threedi_schema/domain/models.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/threedi_schema/domain/models.py b/threedi_schema/domain/models.py index 9305ed3..ace8bc8 100644 --- a/threedi_schema/domain/models.py +++ b/threedi_schema/domain/models.py @@ -1,4 +1,4 @@ -from sqlalchemy import Boolean, Column, Float, ForeignKey, Integer, String, Text +from sqlalchemy import Boolean, Column, Float, Integer, String, Text from sqlalchemy.orm import declarative_base from . import constants @@ -140,9 +140,7 @@ class Surface(Base): code = Column(String(100)) display_name = Column(String(255)) area = Column(Float) - surface_parameters_id = Column( - Integer, ForeignKey(SurfaceParameter.__tablename__ + ".id"), nullable=False - ) + surface_parameters_id = Column(Integer) geom = Column( Geometry("POLYGON"), nullable=True, @@ -450,9 +448,7 @@ class SurfaceMap(Base): __tablename__ = "surface_map" id = Column(Integer, primary_key=True) surface_id = Column(Integer, nullable=False) - connection_node_id = Column( - Integer, ForeignKey(ConnectionNode.__tablename__ + ".id"), nullable=False - ) + connection_node_id = Column(Integer) percentage = Column(Float) geom = Column(Geometry("LINESTRING"), nullable=False) tags = Column(Text)