From 5fb7a74e23b2059ec0c1acb72d8d804adbf05c52 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 13 Jun 2015 15:27:28 +0200 Subject: 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 --- upgrading/4.0.0.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'upgrading') 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. -- cgit v1.2.3-70-g09d2