Fixed cascading for real this time
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2021-04-19 17:25:17 +02:00
parent 461ed329e4
commit 565c662ee2

View File

@ -6,4 +6,4 @@ class Controller(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
job_id = db.Column(db.Integer, db.ForeignKey("job.id", ondelete="CASCADE"), nullable=False)
job = db.relationship("Job", cascade='delete', backref=db.backref("controllers", lazy='joined'))
job = db.relationship("Job", backref=db.backref("controllers", cascade='all, delete-orphan', lazy='joined'))