diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-02-20 01:06:31 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2017-02-20 01:06:31 +0100 |
commit | 4aae47ee918792cf464f33aa6a870453c3091e21 (patch) | |
tree | b52fe86390d86a93ecf6916f355c086a4e5a5abf /src/web/models/tag.py | |
parent | wip (diff) | |
download | newspipe-4aae47ee918792cf464f33aa6a870453c3091e21.tar.gz newspipe-4aae47ee918792cf464f33aa6a870453c3091e21.tar.bz2 newspipe-4aae47ee918792cf464f33aa6a870453c3091e21.zip |
wip
Diffstat (limited to 'src/web/models/tag.py')
-rw-r--r-- | src/web/models/tag.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/web/models/tag.py b/src/web/models/tag.py index 28727dbf..c23d15ea 100644 --- a/src/web/models/tag.py +++ b/src/web/models/tag.py @@ -20,15 +20,19 @@ class ArticleTag(db.Model): class BookmarkTag(db.Model): - text = db.Column(db.String, primary_key=True, unique=False) + __tablename__ = 'BookmarkTag' + #id = db.Column(db.Integer, primary_key=True) + text = db.Column(db.String, primary_key=True) # foreign keys - bookmark_id = db.Column(db.Integer, db.ForeignKey('bookmark.id', ondelete='CASCADE'), - primary_key=True) + # bookmark_id = db.Column(db.Integer, db.ForeignKey('bookmark.id', ondelete='CASCADE'), + # primary_key=True) # relationships - bookmark = db.relationship('Bookmark', back_populates='tag_objs', - foreign_keys=[bookmark_id]) + # bookmark = db.relationship('Bookmark', back_populates='tag_objs', + # single_parent=True, + # cascade="all, delete-orphan", + # foreign_keys=[bookmark_id]) def __init__(self, text): self.text = text |