diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2015-11-10 19:26:57 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2016-02-07 10:39:22 +0100 |
commit | 3412de21d32708b44d1fb3011649734e3cc67d9b (patch) | |
tree | 8124b4cad4d68a01a0d8aeff90c9e8584d173541 /git-interface | |
parent | daee000604243b95e439167c97b3ee8cdc4f6ca3 (diff) | |
download | aur-3412de21d32708b44d1fb3011649734e3cc67d9b.tar.gz aur-3412de21d32708b44d1fb3011649734e3cc67d9b.tar.xz |
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>
Diffstat (limited to 'git-interface')
-rwxr-xr-x | git-interface/git-serve.py | 2 | ||||
-rwxr-xr-x | git-interface/git-update.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/git-interface/git-serve.py b/git-interface/git-serve.py index 85815903..ff389d26 100755 --- a/git-interface/git-serve.py +++ b/git-interface/git-serve.py @@ -81,7 +81,7 @@ def create_pkgbase(pkgbase, user): "UNIX_TIMESTAMP(), %s, %s)", [pkgbase, userid, userid]) pkgbase_id = cur.lastrowid - cur.execute("INSERT INTO CommentNotify (PackageBaseID, UserID) " + + cur.execute("INSERT INTO PackageNotifications (PackageBaseID, UserID) " + "VALUES (%s, %s)", [pkgbase_id, userid]) db.commit() diff --git a/git-interface/git-update.py b/git-interface/git-update.py index a4a8d8d7..3b587b3f 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() |