[PATCH 9 of 9] model: comment out but retain Notification and UserNotification classes

Thomas De Schampheleire patrickdepinguin at gmail.com
Thu Dec 6 08:14:29 UTC 2018


# HG changeset patch
# User Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
# Date 1544042393 -3600
#      Wed Dec 05 21:39:53 2018 +0100
# Node ID a6e7e098056c78e54d541c9cc410a5c94b320c74
# Parent  7e14c85c74fc6726ea46f41a98eba68093495d6f
model: comment out but retain Notification and UserNotification classes

This commit is part of the removal of the UI notification feature from
Kallithea, which is not deemed useful in its current form. Only email
notifications are preserved.

Retain the class and tablename in comments, as database migration will be
required if ever we reintroduce a database-hosted notification feature and
would use the same table names.

diff --git a/kallithea/model/db.py b/kallithea/model/db.py
--- a/kallithea/model/db.py
+++ b/kallithea/model/db.py
@@ -2475,11 +2475,15 @@ class PullRequestReviewer(Base, BaseDbMo
         )
 
 
-class Notification(object):
-    __tablename__ = 'notifications'
-
-class UserNotification(object):
-    __tablename__ = 'user_to_notification'
+# Notification and UserNotification are no longer used.
+# The below lines are preserved below as a reminder for the future: if ever we
+# reintroduce db tables with below names, the necessary alembic migration
+# script needs to be written to migrate from the old definition.
+#class Notification(object):
+#    __tablename__ = 'notifications'
+#
+#class UserNotification(object):
+#    __tablename__ = 'user_to_notification'
 
 
 class Gist(Base, BaseDbModel):


More information about the kallithea-general mailing list