summaryrefslogtreecommitdiffstats
path: root/schema
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-04-19 08:53:30 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2017-04-19 09:13:09 +0200
commit44858e06188946c0082bb09061fcfa6cbb33938b (patch)
treec52a51105fac66a08d0d936b28c60c04b6d051b2 /schema
parent15501972bce458ad7862786311ca8264f5f34081 (diff)
downloadaur-44858e06188946c0082bb09061fcfa6cbb33938b.tar.gz
aur-44858e06188946c0082bb09061fcfa6cbb33938b.tar.xz
Store dependency descriptions in a separate column
Split optional dependency descriptions from dependency names before storing them in the database and use a separate column to store the descriptions. This allows us to simplify and optimize the SQL queries in pkg_dependencies() as well as pkg_required(). Suggested-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'schema')
-rw-r--r--schema/aur-schema.sql1
1 files changed, 1 insertions, 0 deletions
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql
index 89167b32..be6f3e54 100644
--- a/schema/aur-schema.sql
+++ b/schema/aur-schema.sql
@@ -187,6 +187,7 @@ CREATE TABLE PackageDepends (
PackageID INTEGER UNSIGNED NOT NULL,
DepTypeID TINYINT UNSIGNED NOT NULL,
DepName VARCHAR(255) NOT NULL,
+ DepDesc VARCHAR(255) NULL DEFAULT NULL,
DepCondition VARCHAR(255),
DepArch VARCHAR(255) NULL DEFAULT NULL,
FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE,