diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-02-01 15:16:29 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-02-01 15:16:29 +0100 |
commit | 34ac351e82a4e774b5c0bc3380b0ff90cb5a486d (patch) | |
tree | 312cbe27a4577745e849214bb72a5f36a75aa3ae | |
parent | 366ea03118dcd06047dc178d0c8c620af8612530 (diff) |
Drop "PackageContents" table and references.
We don't even touch source tarballs anymore - except for extracting the
PKGBUILD, so this is no longer needed.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r-- | UPGRADING | 2 | ||||
-rw-r--r-- | support/schema/aur-schema.sql | 11 | ||||
-rwxr-xr-x | support/schema/gendummydata.py | 28 |
3 files changed, 1 insertions, 40 deletions
@@ -10,7 +10,7 @@ From 1.7.0 to 1.8.0 ALTER TABLE Packages ADD OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL; UPDATE Packages SET OutOfDateTS = UNIX_TIMESTAMP() WHERE OutOfDate = 1; ALTER TABLE Packages DROP OutOfDate, DROP FSPath, DROP URLPath, DROP LocationID; -DROP TABLE PackageLocations; +DROP TABLE PackageLocations, PackageContents; ---- 2. You will need to update all packages which are stored in the incoming dir as diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql index 269612b..cb5ea42 100644 --- a/support/schema/aur-schema.sql +++ b/support/schema/aur-schema.sql @@ -151,17 +151,6 @@ CREATE TABLE PackageVotes ( ); CREATE UNIQUE INDEX VoteUsersIDPackageID ON PackageVotes (UsersID, PackageID); --- The individual files and their file system location. --- -CREATE TABLE PackageContents ( - PackageID INTEGER UNSIGNED NOT NULL, - FSPath CHAR(255) NOT NULL DEFAULT '', - URLPath CHAR(255) NOT NULL DEFAULT '', - FileSize BIGINT UNSIGNED NOT NULL default 0, - INDEX (PackageID), - FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE -); - -- Record comments for packages -- CREATE TABLE PackageComments ( diff --git a/support/schema/gendummydata.py b/support/schema/gendummydata.py index a03b3e6..e3c14f8 100755 --- a/support/schema/gendummydata.py +++ b/support/schema/gendummydata.py @@ -244,34 +244,6 @@ for p in seen_pkgs.keys(): s = "INSERT INTO PackageComments (PackageID, UsersID, Comments, CommentTS) VALUES (%d, %d, '%s', %d);\n" % (seen_pkgs[p], genUID(), fortune, now) out.write(s) - others = random.randrange(0,3) - s = "INSERT INTO PackageContents (PackageID, FSPath, FileSize) VALUES (%d, '%s', %d);\n" % (seen_pkgs[p], "/home/aur/incoming/%s/PKGBUILD" % p, - random.randrange(0,999)) - out.write(s) - if others == 0: - s = "INSERT INTO PackageContents (PackageID, FSPath, FileSize) VALUES (%d, '%s', %d);\n" % (seen_pkgs[p], "/home/aur/incoming/%s/%s.patch" % (p,p), - random.randrange(0,999)) - out.write(s) - - elif others == 1: - s = "INSERT INTO PackageContents (PackageID, FSPath, FileSize) VALUES (%d, '%s', %d);\n" % (seen_pkgs[p], "/home/aur/incoming/%s/%s.patch" % (p,p), - random.randrange(0,999)) - out.write(s) - s = "INSERT INTO PackageContents (PackageID, FSPath, FileSize) VALUES (%d, '%s', %d);\n" % (seen_pkgs[p], "/home/aur/incoming/%s/arch.patch" % p, - random.randrange(0,999)) - out.write(s) - - elif others == 2: - s = "INSERT INTO PackageContents (PackageID, FSPath, FileSize) VALUES (%d, '%s', %d);\n" % (seen_pkgs[p], "/home/aur/incoming/%s/%s.patch" % (p,p), - random.randrange(0,999)) - out.write(s) - s = "INSERT INTO PackageContents (PackageID, FSPath, FileSize) VALUES (%d, '%s', %d);\n" % (seen_pkgs[p], "/home/aur/incoming/%s/arch.patch" % p, - random.randrange(0,999)) - out.write(s) - s = "INSERT INTO PackageContents (PackageID, FSPath, FileSize) VALUES (%d, '%s', %d);\n" % (seen_pkgs[p], "/home/aur/incoming/%s/%s.install" % (p,p), - random.randrange(0,999)) - out.write(s) - if DBUG: print "." # Cast votes |