summaryrefslogtreecommitdiffstats
path: root/upgrading
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-06-13 15:27:28 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-14 17:58:55 +0200
commit5fb7a74e23b2059ec0c1acb72d8d804adbf05c52 (patch)
treeae04e34d7dd30bcd0bc913c910c4d9b9feb8a4ee /upgrading
parent4c1bb8b7e510dd85b290f43c2439ca2f017d0dd6 (diff)
downloadaurweb-5fb7a74e23b2059ec0c1acb72d8d804adbf05c52.tar.xz
Replace categories with keywords
Remove package base categories. Instead, users can now specify up to twenty custom keywords that are taken into consideration when searching. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'upgrading')
-rw-r--r--upgrading/4.0.0.txt22
1 files changed, 21 insertions, 1 deletions
diff --git a/upgrading/4.0.0.txt b/upgrading/4.0.0.txt
index aa1e535..fd04c44 100644
--- a/upgrading/4.0.0.txt
+++ b/upgrading/4.0.0.txt
@@ -38,4 +38,24 @@ ALTER TABLE PackageBases
ADD COLUMN Popularity DECIMAL(6,2) UNSIGNED NOT NULL DEFAULT 0;
----
-6. (optional) Setup cgit to browse the Git repositories via HTTP.
+6. Drop the category ID foreign key from the PackageBases table:
+
+`ALTER TABLE PackageBases DROP FOREIGN KEY PackageBases_ibfk_1;` should
+work in most cases. Otherwise, check the output of `SHOW CREATE TABLE
+PackageBases;` and use the foreign key name shown there.
+
+7. Replace the package base categories with keywords:
+
+----
+ALTER TABLE PackageBases DROP COLUMN CategoryID;
+DROP TABLE PackageCategories;
+
+CREATE TABLE PackageKeywords (
+ PackageBaseID INTEGER UNSIGNED NOT NULL,
+ Keyword VARCHAR(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (PackageBaseID, Keyword),
+ FOREIGN KEY (PackageBaseID) REFERENCES PackageBases(ID) ON DELETE CASCADE
+) ENGINE = InnoDB;
+----
+
+8. (optional) Setup cgit to browse the Git repositories via HTTP.