Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-02-27 17:12:43 +01:00
parent 84c2491e63
commit 1e3fa38de5
8 changed files with 20 additions and 10 deletions

View file

@ -104,8 +104,8 @@ CREATE TABLE Packages (
OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL,
SubmittedTS BIGINT UNSIGNED NOT NULL,
ModifiedTS BIGINT UNSIGNED NOT NULL,
SubmitterUID INTEGER UNSIGNED NOT NULL DEFAULT 0, -- who submitted it?
MaintainerUID INTEGER UNSIGNED NOT NULL DEFAULT 0, -- User
SubmitterUID INTEGER UNSIGNED NULL DEFAULT NULL, -- who submitted it?
MaintainerUID INTEGER UNSIGNED NULL DEFAULT NULL, -- User
PRIMARY KEY (ID),
UNIQUE (Name),
INDEX (CategoryID),

View file

@ -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 ".",