summaryrefslogtreecommitdiffstats
path: root/schema/gendummydata.py
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-04-04 21:57:01 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 12:21:35 +0200
commitd35cf67f7ba24a6c8f6c27f6f016b6f28c8e9f9b (patch)
tree522f403f26130ddae25a2c7ca9427b3008c891a5 /schema/gendummydata.py
parentb7941073acec76e5b4f89648aca1413c15eb067f (diff)
downloadaur-d35cf67f7ba24a6c8f6c27f6f016b6f28c8e9f9b.tar.gz
aur-d35cf67f7ba24a6c8f6c27f6f016b6f28c8e9f9b.tar.xz
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>
Diffstat (limited to 'schema/gendummydata.py')
-rwxr-xr-xschema/gendummydata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/schema/gendummydata.py b/schema/gendummydata.py
index c2cb388c..bc0ede8a 100755
--- a/schema/gendummydata.py
+++ b/schema/gendummydata.py
@@ -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)