Commit 366ea031 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

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: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 7a58e99e
...@@ -9,7 +9,7 @@ From 1.7.0 to 1.8.0 ...@@ -9,7 +9,7 @@ From 1.7.0 to 1.8.0
---- ----
ALTER TABLE Packages ADD OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL; ALTER TABLE Packages ADD OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL;
UPDATE Packages SET OutOfDateTS = UNIX_TIMESTAMP() WHERE OutOfDate = 1; 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; DROP TABLE PackageLocations;
---- ----
......
...@@ -99,7 +99,6 @@ CREATE TABLE Packages ( ...@@ -99,7 +99,6 @@ CREATE TABLE Packages (
Description CHAR(255) NOT NULL DEFAULT "An Arch Package", Description CHAR(255) NOT NULL DEFAULT "An Arch Package",
URL CHAR(255) NOT NULL DEFAULT "http://www.archlinux.org", URL CHAR(255) NOT NULL DEFAULT "http://www.archlinux.org",
DummyPkg TINYINT UNSIGNED NOT NULL DEFAULT 0, -- 1=>dummy DummyPkg TINYINT UNSIGNED NOT NULL DEFAULT 0, -- 1=>dummy
FSPath CHAR(255) NOT NULL DEFAULT '',
License CHAR(40) NOT NULL DEFAULT '', License CHAR(40) NOT NULL DEFAULT '',
NumVotes INTEGER UNSIGNED NOT NULL DEFAULT 0, NumVotes INTEGER UNSIGNED NOT NULL DEFAULT 0,
OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL, OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL,
......
...@@ -282,14 +282,13 @@ if ($_COOKIE["AURSID"]): ...@@ -282,14 +282,13 @@ if ($_COOKIE["AURSID"]):
} }
# Update package data # 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['pkgname']),
mysql_real_escape_string($new_pkgbuild['pkgver']), mysql_real_escape_string($new_pkgbuild['pkgver']),
mysql_real_escape_string($new_pkgbuild['pkgrel']), mysql_real_escape_string($new_pkgbuild['pkgrel']),
mysql_real_escape_string($new_pkgbuild['license']), mysql_real_escape_string($new_pkgbuild['license']),
mysql_real_escape_string($new_pkgbuild['pkgdesc']), mysql_real_escape_string($new_pkgbuild['pkgdesc']),
mysql_real_escape_string($new_pkgbuild['url']), mysql_real_escape_string($new_pkgbuild['url']),
mysql_real_escape_string($incoming_pkgdir . "/" . $pkg_name . ".tar.gz"),
$pdata["ID"]); $pdata["ID"]);
db_query($q, $dbh); db_query($q, $dbh);
...@@ -327,7 +326,7 @@ if ($_COOKIE["AURSID"]): ...@@ -327,7 +326,7 @@ if ($_COOKIE["AURSID"]):
$uid = uid_from_sid($_COOKIE["AURSID"]); $uid = uid_from_sid($_COOKIE["AURSID"]);
# This is a brand new package # 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['pkgname']),
mysql_real_escape_string($new_pkgbuild['license']), mysql_real_escape_string($new_pkgbuild['license']),
mysql_real_escape_string($new_pkgbuild['pkgver']), mysql_real_escape_string($new_pkgbuild['pkgver']),
...@@ -336,8 +335,7 @@ if ($_COOKIE["AURSID"]): ...@@ -336,8 +335,7 @@ if ($_COOKIE["AURSID"]):
mysql_real_escape_string($new_pkgbuild['pkgdesc']), mysql_real_escape_string($new_pkgbuild['pkgdesc']),
mysql_real_escape_string($new_pkgbuild['url']), mysql_real_escape_string($new_pkgbuild['url']),
$uid, $uid,
$uid, $uid);
mysql_real_escape_string($incoming_pkgdir . "/" . $pkg_name . ".tar.gz"));
$result = db_query($q, $dbh); $result = db_query($q, $dbh);
$packageID = mysql_insert_id($dbh); $packageID = mysql_insert_id($dbh);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment