aboutsummaryrefslogtreecommitdiff
path: root/src/web/models
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2017-05-23 23:26:25 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2017-05-23 23:26:25 +0200
commitedfdb4a443ab89d8d0dcb0952aab96423b4544fc (patch)
tree9fb5c6e220cb5bc880a83762ef19f762ec6dc60b /src/web/models
parentremoved a comment (diff)
downloadnewspipe-edfdb4a443ab89d8d0dcb0952aab96423b4544fc.tar.gz
newspipe-edfdb4a443ab89d8d0dcb0952aab96423b4544fc.tar.bz2
newspipe-edfdb4a443ab89d8d0dcb0952aab96423b4544fc.zip
Added database migration script.
Diffstat (limited to 'src/web/models')
-rw-r--r--src/web/models/bookmark.py2
-rw-r--r--src/web/models/tag.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/web/models/bookmark.py b/src/web/models/bookmark.py
index 6eee3cba..a01e6973 100644
--- a/src/web/models/bookmark.py
+++ b/src/web/models/bookmark.py
@@ -43,7 +43,7 @@ class Bookmark(db.Model, RightMixin):
id = db.Column(db.Integer(), primary_key=True)
href = db.Column(db.String(), default="")
title = db.Column(db.String(), default="")
- description = db.Column(db.String(), default="FR")
+ description = db.Column(db.String(), default="")
shared = db.Column(db.Boolean(), default=False)
to_read = db.Column(db.Boolean(), default=False)
time = db.Column(db.DateTime(), default=datetime.utcnow)
diff --git a/src/web/models/tag.py b/src/web/models/tag.py
index 623808f0..76467c0b 100644
--- a/src/web/models/tag.py
+++ b/src/web/models/tag.py
@@ -24,7 +24,7 @@ class BookmarkTag(db.Model):
text = db.Column(db.String, unique=False)
# foreign keys
- user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
+ user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete='CASCADE'))
bookmark_id = db.Column(db.Integer, db.ForeignKey('bookmark.id', ondelete='CASCADE'))
# relationships
bgstack15