Skip to content

Commit 5745c1d

Browse files
committed
Remove foreign key requirements that were missed before
1 parent e38c1e9 commit 5745c1d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

threedi_schema/domain/models.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from sqlalchemy import Boolean, Column, Float, ForeignKey, Integer, String, Text
1+
from sqlalchemy import Boolean, Column, Float, Integer, String, Text
22
from sqlalchemy.orm import declarative_base
33

44
from . import constants
@@ -140,9 +140,7 @@ class Surface(Base):
140140
code = Column(String(100))
141141
display_name = Column(String(255))
142142
area = Column(Float)
143-
surface_parameters_id = Column(
144-
Integer, ForeignKey(SurfaceParameter.__tablename__ + ".id"), nullable=False
145-
)
143+
surface_parameters_id = Column(Integer)
146144
geom = Column(
147145
Geometry("POLYGON"),
148146
nullable=True,
@@ -450,9 +448,7 @@ class SurfaceMap(Base):
450448
__tablename__ = "surface_map"
451449
id = Column(Integer, primary_key=True)
452450
surface_id = Column(Integer, nullable=False)
453-
connection_node_id = Column(
454-
Integer, ForeignKey(ConnectionNode.__tablename__ + ".id"), nullable=False
455-
)
451+
connection_node_id = Column(Integer)
456452
percentage = Column(Float)
457453
geom = Column(Geometry("LINESTRING"), nullable=False)
458454
tags = Column(Text)

0 commit comments

Comments
 (0)