mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Store comments on a per-package base basis
Move comments from the Packages table to PackageBases. Sharing comments makes sense since they almost always refer to a source package. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
b7941073ac
commit
d35cf67f7b
4 changed files with 49 additions and 47 deletions
|
@ -216,7 +216,7 @@ for p in list(seen_pkgs.keys()):
|
|||
num_comments = random.randrange(PKG_CMNTS[0], PKG_CMNTS[1])
|
||||
for i in range(0, num_comments):
|
||||
now = NOW + random.randrange(400, 86400*3)
|
||||
s = ("INSERT INTO PackageComments (PackageID, UsersID,"
|
||||
s = ("INSERT INTO PackageComments (PackageBaseID, UsersID,"
|
||||
" Comments, CommentTS) VALUES (%d, %d, '%s', %d);\n")
|
||||
s = s % (seen_pkgs[p], genUID(), genFortune(), now)
|
||||
out.write(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue