diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-04-17 19:49:26 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-04-17 21:09:16 +0200 |
commit | 73936002f7d5685a9063683f68d4e8c2e01be0ac (patch) | |
tree | c1f152f76be0399222a47cab2060998e41ce5688 /UPGRADING | |
parent | 32b5d466439b5c291472c68f6a732c5be4ca60cf (diff) | |
download | aurweb-73936002f7d5685a9063683f68d4e8c2e01be0ac.tar.xz |
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 <archlinux@cryptocrack.de>
Diffstat (limited to 'UPGRADING')
-rw-r--r-- | UPGRADING | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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 ------------------- |