Commit 0c6a415c authored by Mark Weiman's avatar Mark Weiman Committed by Lukas Fleischer
Browse files Fix NOT NULL constraint problems

PackageBases.FlaggerComment and PackageComments.RenderedComment cannot
be NULL and would cause problems in the output file for sqlite users.
This patch adds empty strings ("") as values for these fields.

Signed-off-by: default avatarMark Weiman <>
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <>
parent a8ac2004
......@@ -205,8 +205,8 @@ for p in list(seen_pkgs.keys()):
uuid = genUID() # the submitter/user
s = ("INSERT INTO PackageBases (ID, Name, SubmittedTS, ModifiedTS, "
"SubmitterUID, MaintainerUID, PackagerUID) VALUES (%d, '%s', %d, %d, %d, %s, %s);\n")
s = ("INSERT INTO PackageBases (ID, Name, FlaggerComment, SubmittedTS, ModifiedTS, "
"SubmitterUID, MaintainerUID, PackagerUID) VALUES (%d, '%s', '', %d, %d, %d, %s, %s);\n")
s = s % (seen_pkgs[p], p, NOW, NOW, uuid, muid, puid)
......@@ -223,7 +223,7 @@ for p in list(seen_pkgs.keys()):
for i in range(0, num_comments):
now = NOW + random.randrange(400, 86400*3)
s = ("INSERT INTO PackageComments (PackageBaseID, UsersID,"
" Comments, CommentTS) VALUES (%d, %d, '%s', %d);\n")
" Comments, RenderedComment, CommentTS) VALUES (%d, %d, '%s', '', %d);\n")
s = s % (seen_pkgs[p], genUID(), genFortune(), now)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment