Fix #206 - Overtaking events are deleted now, when the parent track is deleted

This commit is contained in:
Dennis Boldt 2022-05-21 14:21:58 +02:00
parent 8728347695
commit ad5a0bfbf6
2 changed files with 5 additions and 5 deletions

View file

@ -208,7 +208,7 @@ to import the whole region you are serving.
```bash ```bash
osm2pgsql --create --hstore --style roads_import.lua -O flex \ osm2pgsql --create --hstore --style roads_import.lua -O flex \
-H localhost -d obs -U obs \ -H localhost -d obs -U obs -W \
path/to/downloaded/myarea-latest.osm.pbf path/to/downloaded/myarea-latest.osm.pbf
``` ```

View file

@ -403,22 +403,22 @@ class Comment(Base):
Comment.author = relationship("User", back_populates="authored_comments") Comment.author = relationship("User", back_populates="authored_comments")
User.authored_comments = relationship( User.authored_comments = relationship(
"Comment", order_by=Comment.created_at, back_populates="author" "Comment", order_by=Comment.created_at, back_populates="author", passive_deletes=True
) )
Track.author = relationship("User", back_populates="authored_tracks") Track.author = relationship("User", back_populates="authored_tracks")
User.authored_tracks = relationship( User.authored_tracks = relationship(
"Track", order_by=Track.created_at, back_populates="author" "Track", order_by=Track.created_at, back_populates="author", passive_deletes=True
) )
Comment.track = relationship("Track", back_populates="comments") Comment.track = relationship("Track", back_populates="comments")
Track.comments = relationship( Track.comments = relationship(
"Comment", order_by=Comment.created_at, back_populates="track" "Comment", order_by=Comment.created_at, back_populates="track", passive_deletes=True
) )
OvertakingEvent.track = relationship("Track", back_populates="overtaking_events") OvertakingEvent.track = relationship("Track", back_populates="overtaking_events")
Track.overtaking_events = relationship( Track.overtaking_events = relationship(
"OvertakingEvent", order_by=OvertakingEvent.time, back_populates="track" "OvertakingEvent", order_by=OvertakingEvent.time, back_populates="track", passive_deletes=True
) )