diff options
author | eric <eric> | 2005-03-06 21:44:56 +0000 |
---|---|---|
committer | eric <eric> | 2005-03-06 21:44:56 +0000 |
commit | e3587ddf94ba742beabdaa8a68023f8ee0234b58 (patch) | |
tree | c5b579f1b92b8fd20453fb348f0bb240832ec8c8 /support/schema | |
parent | aae43d9ad6fc83d04a4975f27392c1422dfa0ec4 (diff) |
started working on pkgedit for comments
Diffstat (limited to 'support/schema')
-rw-r--r-- | support/schema/aur-schema.sql | 2 | ||||
-rw-r--r-- | support/schema/dummy-data.sql.bz2 | bin | 1884846 -> 1882935 bytes | |||
-rwxr-xr-x | support/schema/gendummydata.py | 4 |
3 files changed, 4 insertions, 2 deletions
diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql index c2cd08b..2d70dae 100644 --- a/support/schema/aur-schema.sql +++ b/support/schema/aur-schema.sql @@ -187,9 +187,11 @@ CREATE TABLE PackageComments ( UsersID INTEGER UNSIGNED NOT NULL, Comments TEXT NOT NULl DEFAULT '', CommentTS BIGINT UNSIGNED NOT NULL DEFAULT 0, + DelUsersID INTEGER UNSIGNED NOT NULL DEFAULT 0, INDEX (UsersID), INDEX (PackageID), FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE, + FOREIGN KEY (DelUsersID) REFERENCES Users(ID) ON DELETE CASCADE, FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE ); diff --git a/support/schema/dummy-data.sql.bz2 b/support/schema/dummy-data.sql.bz2 Binary files differindex cf1c87a..e342e28 100644 --- a/support/schema/dummy-data.sql.bz2 +++ b/support/schema/dummy-data.sql.bz2 diff --git a/support/schema/gendummydata.py b/support/schema/gendummydata.py index fd82bea..9915f58 100755 --- a/support/schema/gendummydata.py +++ b/support/schema/gendummydata.py @@ -267,9 +267,9 @@ for p in seen_pkgs.keys(): # num_comments = random.randrange(PKG_CMNTS[0], PKG_CMNTS[1]) for i in range(0, num_comments): - fortune = esc(commands.getoutput(FORTUNE_CMD).replace("'","").replace("\n"," ")) + fortune = esc(commands.getoutput(FORTUNE_CMD).replace("'","")) now = NOW + random.randrange(400, 86400*3) - s = "INSERT INTO PackageComments (PackageID, UsersID, Comments, CommentTS) VALUES (%d, %d, '%s', %d);\n" % (seen_pkgs[p], uuid, fortune, now) + s = "INSERT INTO PackageComments (PackageID, UsersID, Comments, CommentTS) VALUES (%d, %d, '%s', %d);\n" % (seen_pkgs[p], genUID(), fortune, now) out.write(s) if location_id == 1: # Unsupported - just a PKGBUILD and maybe other stuff |