diff --git a/progit/model.py b/progit/model.py index a650d87..a1168c8 100644 --- a/progit/model.py +++ b/progit/model.py @@ -367,7 +367,11 @@ class TagIssue(BASE): __tablename__ = 'tags_issues' - tag = sa.Column(sa.Text(), primary_key=True) + tag = sa.Column( + sa.Text(), + sa.ForeignKey( + 'tags.tag', ondelete='CASCADE', onupdate='CASCADE'), + primary_key=True) issue_id = sa.Column( sa.Integer, sa.ForeignKey(