From 3412de21d32708b44d1fb3011649734e3cc67d9b Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 10 Nov 2015 19:26:57 +0100 Subject: Rename the CommentNotify table to PackageNotifications As a preparatory step to adding support for package notifications on events other than comments, rename the database table accordingly. Signed-off-by: Lukas Fleischer --- git-interface/git-update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git-interface/git-update.py') diff --git a/git-interface/git-update.py b/git-interface/git-update.py index a4a8d8d..3b587b3 100755 --- a/git-interface/git-update.py +++ b/git-interface/git-update.py @@ -160,11 +160,11 @@ def save_metadata(metadata, db, cur, user): # Add user to notification list on adoption. if was_orphan: - cur.execute("SELECT COUNT(*) FROM CommentNotify WHERE " + + cur.execute("SELECT COUNT(*) FROM PackageNotifications WHERE " + "PackageBaseID = %s AND UserID = %s", [pkgbase_id, user_id]) if cur.fetchone()[0] == 0: - cur.execute("INSERT INTO CommentNotify (PackageBaseID, UserID) " + + cur.execute("INSERT INTO PackageNotifications (PackageBaseID, UserID) " + "VALUES (%s, %s)", [pkgbase_id, user_id]) db.commit() -- cgit v1.2.3-54-g00ecf