From 366ea03118dcd06047dc178d0c8c620af8612530 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 1 Feb 2011 15:01:56 +0100 Subject: Remove "FSPath" column from "Packages" table. This field is not used anymore, so drop it from the table and remove all references. Signed-off-by: Lukas Fleischer --- UPGRADING | 2 +- support/schema/aur-schema.sql | 1 - web/html/pkgsubmit.php | 8 +++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/UPGRADING b/UPGRADING index e5dc5273..d4e4e3ce 100644 --- a/UPGRADING +++ b/UPGRADING @@ -9,7 +9,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 URLPath, DROP LocationID; +ALTER TABLE Packages DROP OutOfDate, DROP FSPath, DROP URLPath, DROP LocationID; DROP TABLE PackageLocations; ---- diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql index 6af81678..269612bd 100644 --- a/support/schema/aur-schema.sql +++ b/support/schema/aur-schema.sql @@ -99,7 +99,6 @@ CREATE TABLE Packages ( Description CHAR(255) NOT NULL DEFAULT "An Arch Package", URL CHAR(255) NOT NULL DEFAULT "http://www.archlinux.org", DummyPkg TINYINT UNSIGNED NOT NULL DEFAULT 0, -- 1=>dummy - FSPath CHAR(255) NOT NULL DEFAULT '', License CHAR(40) NOT NULL DEFAULT '', NumVotes INTEGER UNSIGNED NOT NULL DEFAULT 0, OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL, diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index df9f9314..508120c4 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -282,14 +282,13 @@ if ($_COOKIE["AURSID"]): } # Update package data - $q = sprintf("UPDATE Packages SET ModifiedTS = UNIX_TIMESTAMP(), Name = '%s', Version = '%s-%s', License = '%s', Description = '%s', URL = '%s', FSPath = '%s', OutOfDateTS = NULL WHERE ID = %d", + $q = sprintf("UPDATE Packages SET ModifiedTS = UNIX_TIMESTAMP(), Name = '%s', Version = '%s-%s', License = '%s', Description = '%s', URL = '%s', OutOfDateTS = NULL WHERE ID = %d", mysql_real_escape_string($new_pkgbuild['pkgname']), mysql_real_escape_string($new_pkgbuild['pkgver']), mysql_real_escape_string($new_pkgbuild['pkgrel']), mysql_real_escape_string($new_pkgbuild['license']), mysql_real_escape_string($new_pkgbuild['pkgdesc']), mysql_real_escape_string($new_pkgbuild['url']), - mysql_real_escape_string($incoming_pkgdir . "/" . $pkg_name . ".tar.gz"), $pdata["ID"]); db_query($q, $dbh); @@ -327,7 +326,7 @@ if ($_COOKIE["AURSID"]): $uid = uid_from_sid($_COOKIE["AURSID"]); # This is a brand new package - $q = sprintf("INSERT INTO Packages (Name, License, Version, CategoryID, Description, URL, SubmittedTS, SubmitterUID, MaintainerUID, FSPath) VALUES ('%s', '%s', '%s-%s', %d, '%s', '%s', UNIX_TIMESTAMP(), %d, %d, '%s')", + $q = sprintf("INSERT INTO Packages (Name, License, Version, CategoryID, Description, URL, SubmittedTS, SubmitterUID, MaintainerUID) VALUES ('%s', '%s', '%s-%s', %d, '%s', '%s', UNIX_TIMESTAMP(), %d, %d)", mysql_real_escape_string($new_pkgbuild['pkgname']), mysql_real_escape_string($new_pkgbuild['license']), mysql_real_escape_string($new_pkgbuild['pkgver']), @@ -336,8 +335,7 @@ if ($_COOKIE["AURSID"]): mysql_real_escape_string($new_pkgbuild['pkgdesc']), mysql_real_escape_string($new_pkgbuild['url']), $uid, - $uid, - mysql_real_escape_string($incoming_pkgdir . "/" . $pkg_name . ".tar.gz")); + $uid); $result = db_query($q, $dbh); $packageID = mysql_insert_id($dbh); -- cgit v1.2.3-24-g4f1b