diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2017-04-24 21:16:04 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2017-04-25 07:00:52 +0200 |
commit | f4e2d143adca93b6ebba051e5f1c3e97266bb747 (patch) | |
tree | 482738e43e4a9a4cdf5d6d074444c1a5728c467e /aurweb | |
parent | 90ab7c7b838a706ae7f4e63f95ccdc706ce10977 (diff) | |
download | aur-f4e2d143adca93b6ebba051e5f1c3e97266bb747.tar.gz aur-f4e2d143adca93b6ebba051e5f1c3e97266bb747.tar.xz |
Explicitly initialize PackageBases.FlaggerComment
Since commit 09cb61a (schema: Remove invalid default values for TEXT
columns, 2017-04-15), the PackageBases.FlaggerComment field no longer
has a default value. Initialize this field explicitly whenever a new row
is added to the PackageBases table.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb')
-rwxr-xr-x | aurweb/git/serve.py | 5 | ||||
-rwxr-xr-x | aurweb/git/update.py | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/aurweb/git/serve.py b/aurweb/git/serve.py index 44cce75d..3eef26a7 100755 --- a/aurweb/git/serve.py +++ b/aurweb/git/serve.py @@ -65,8 +65,9 @@ def create_pkgbase(pkgbase, user): now = int(time.time()) cur = conn.execute("INSERT INTO PackageBases (Name, SubmittedTS, " + - "ModifiedTS, SubmitterUID, MaintainerUID) VALUES " + - "(?, ?, ?, ?, ?)", [pkgbase, now, now, userid, userid]) + "ModifiedTS, SubmitterUID, MaintainerUID, " + + "FlaggerComment) VALUES (?, ?, ?, ?, ?, '')", + [pkgbase, now, now, userid, userid]) pkgbase_id = cur.lastrowid cur = conn.execute("INSERT INTO PackageNotifications " + diff --git a/aurweb/git/update.py b/aurweb/git/update.py index 09a57ef0..c9a98d07 100755 --- a/aurweb/git/update.py +++ b/aurweb/git/update.py @@ -61,8 +61,9 @@ def create_pkgbase(conn, pkgbase, user): now = int(time.time()) cur = conn.execute("INSERT INTO PackageBases (Name, SubmittedTS, " + - "ModifiedTS, SubmitterUID, MaintainerUID) VALUES " + - "(?, ?, ?, ?, ?)", [pkgbase, now, now, userid, userid]) + "ModifiedTS, SubmitterUID, MaintainerUID, " + + "FlaggerComment) VALUES (?, ?, ?, ?, ?, '')", + [pkgbase, now, now, userid, userid]) pkgbase_id = cur.lastrowid cur = conn.execute("INSERT INTO PackageNotifications " + |