summaryrefslogtreecommitdiffstats
path: root/support/schema/gendummydata.py
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-02-27 17:12:43 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-02-27 19:46:19 +0100
commit1e3fa38de5f940fef474fc3961c70b357b976308 (patch)
tree3474eadc3354f5312f245425deb9a2bf1fe64114 /support/schema/gendummydata.py
parent84c2491e63ef2797084f9378674d3e38248b7c24 (diff)
downloadaur-1e3fa38de5f940fef474fc3961c70b357b976308.tar.gz
aur-1e3fa38de5f940fef474fc3961c70b357b976308.tar.xz
Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'support/schema/gendummydata.py')
-rwxr-xr-xsupport/schema/gendummydata.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/support/schema/gendummydata.py b/support/schema/gendummydata.py
index e3c14f83..45812a9c 100755
--- a/support/schema/gendummydata.py
+++ b/support/schema/gendummydata.py
@@ -228,8 +228,13 @@ for p in seen_pkgs.keys():
uuid = genUID() # the submitter/user
- s = "INSERT INTO Packages (ID, Name, Version, CategoryID, SubmittedTS, SubmitterUID, MaintainerUID) VALUES (%d, '%s', '%s', %d, %d, %d, %d);\n" % (seen_pkgs[p], p, genVersion(),
+ if muid == 0:
+ s = "INSERT INTO Packages (ID, Name, Version, CategoryID, SubmittedTS, SubmitterUID, MaintainerUID) VALUES (%d, '%s', '%s', %d, %d, %d, NULL);\n" % (seen_pkgs[p], p, genVersion(),
+ genCategory(), NOW, uuid)
+ else:
+ s = "INSERT INTO Packages (ID, Name, Version, CategoryID, SubmittedTS, SubmitterUID, MaintainerUID) VALUES (%d, '%s', '%s', %d, %d, %d, %d);\n" % (seen_pkgs[p], p, genVersion(),
genCategory(), NOW, uuid, muid)
+
out.write(s)
if count % 100 == 0:
if DBUG: print ".",