summaryrefslogtreecommitdiffstats
path: root/schema
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-06-11 18:41:58 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-11 18:59:52 +0200
commit824744f1d20614c25e972dda7a0b7ac9506dd46f (patch)
tree5f9b58f6264553184779d54569e72b2fbf0cbdb1 /schema
parent0345914c5ce5e8ecafe3e90280bd58c0255fd9e0 (diff)
downloadaur-824744f1d20614c25e972dda7a0b7ac9506dd46f.tar.gz
aur-824744f1d20614c25e972dda7a0b7ac9506dd46f.tar.xz
Add a field for package base popularity
Create a new field Popularity in the PackageBases table. The field is updated by the popupdate script and reflects the popularity of a package. Popularity is the sum of all votes with each vote being weighted with a factor of 0.98 per day since its creation. 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 5641d0d1..1935cf0c 100644
--- a/schema/aur-schema.sql
+++ b/schema/aur-schema.sql
@@ -102,6 +102,7 @@ CREATE TABLE PackageBases (
Name VARCHAR(255) NOT NULL,
CategoryID TINYINT UNSIGNED NOT NULL DEFAULT 1,
NumVotes INTEGER UNSIGNED NOT NULL DEFAULT 0,
+ Popularity DECIMAL(6,2) UNSIGNED NOT NULL DEFAULT 0,
OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL,
SubmittedTS BIGINT UNSIGNED NOT NULL,
ModifiedTS BIGINT UNSIGNED NOT NULL,