Skip to content

Commit

Permalink
Remove foreign key requirements that were missed before
Browse files Browse the repository at this point in the history
  • Loading branch information
margrietpalm committed Dec 5, 2024
1 parent e38c1e9 commit 5745c1d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions threedi_schema/domain/models.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5745c1d

Please sign in to comment.