From 73936002f7d5685a9063683f68d4e8c2e01be0ac Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 17 Apr 2014 19:49:26 +0200 Subject: Store {make,check,opt}depends in the database In addition to parsing and storing dependencies of packages, store makedepends, checkdepends and optdepends. Every dependency (of any type) is displayed on the package details page. Signed-off-by: Lukas Fleischer --- UPGRADING | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'UPGRADING') diff --git a/UPGRADING b/UPGRADING index a33ea63..48737f2 100644 --- a/UPGRADING +++ b/UPGRADING @@ -142,6 +142,29 @@ CREATE UNIQUE INDEX VoteUsersIDPackageID ON PackageVotes (UsersID, PackageBaseID CREATE UNIQUE INDEX NotifyUserIDPkgID ON CommentNotify (UserID, PackageBaseID); ---- +12. Create a new table to store package dependency types: + +---- +CREATE TABLE DependencyTypes ( + ID TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + Name VARCHAR(32) NOT NULL DEFAULT '', + PRIMARY KEY (ID) +) ENGINE = InnoDB; +INSERT INTO DependencyTypes VALUES (1, 'depends'); +INSERT INTO DependencyTypes VALUES (2, 'makedepends'); +INSERT INTO DependencyTypes VALUES (3, 'checkdepends'); +INSERT INTO DependencyTypes VALUES (4, 'optdepends'); +---- + +13. Add a field to store the dependency type to the PackageDepends table: + +---- +ALTER TABLE PackageDepends ADD COLUMN DepTypeID TINYINT UNSIGNED NOT NULL; +UPDATE PackageDepends SET DepTypeID = 1; +ALTER TABLE PackageDepends + ADD FOREIGN KEY (DepTypeID) REFERENCES DependencyTypes(ID) ON DELETE NO ACTION; +---- + From 2.2.0 to 2.3.0 ------------------- -- cgit v1.2.3-70-g09d2