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 /schema/aur-schema.sql | |
parent | 32b5d466439b5c291472c68f6a732c5be4ca60cf (diff) | |
download | aur-73936002f7d5685a9063683f68d4e8c2e01be0ac.tar.gz aur-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 'schema/aur-schema.sql')
-rw-r--r-- | schema/aur-schema.sql | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 9426a61d..327a7921 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -133,15 +133,30 @@ CREATE TABLE Packages ( ) ENGINE = InnoDB; +-- Define the 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'); + + -- Track which dependencies a package has -- CREATE TABLE PackageDepends ( PackageID INTEGER UNSIGNED NOT NULL, + DepTypeID TINYINT UNSIGNED NOT NULL, DepName VARCHAR(64) NOT NULL, DepCondition VARCHAR(20), INDEX (PackageID), INDEX (DepName), - FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE + FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE, + FOREIGN KEY (DepTypeID) REFERENCES DependencyTypes(ID) ON DELETE NO ACTION ) ENGINE = InnoDB; |