From f4e2d143adca93b6ebba051e5f1c3e97266bb747 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 24 Apr 2017 21:16:04 +0200 Subject: 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 --- aurweb/git/serve.py | 5 +++-- aurweb/git/update.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'aurweb') 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 " + -- cgit v1.2.3-24-g4f1b