mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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 <lfleischer@archlinux.org>
This commit is contained in:
parent
daee000604
commit
3412de21d3
8 changed files with 27 additions and 21 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue