Fix #206 - Overtaking events are deleted now, when the parent track is deleted
This commit is contained in:
parent
8728347695
commit
ad5a0bfbf6
|
@ -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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue