liquid_feedback_core

changeset 313:abf6ea622741

Changed rounding behaviour for "harmonic_weight"
author jbe
date Fri Feb 01 20:07:21 2013 +0100 (2013-02-01)
parents c951f0ed6cb8
children 5289d62c028c
files core.sql
line diff
     1.1 --- a/core.sql	Fri Feb 01 18:36:02 2013 +0100
     1.2 +++ b/core.sql	Fri Feb 01 20:07:21 2013 +0100
     1.3 @@ -7,7 +7,7 @@
     1.4  BEGIN;
     1.5  
     1.6  CREATE VIEW "liquid_feedback_version" AS
     1.7 -  SELECT * FROM (VALUES ('2.1.0', 2, 1, 0))
     1.8 +  SELECT * FROM (VALUES ('2.1.1', 2, 1, 1))
     1.9    AS "subquery"("string", "major", "minor", "revision");
    1.10  
    1.11  
    1.12 @@ -612,7 +612,7 @@
    1.13          "informed_supporter_count"           INT4,
    1.14          "satisfied_supporter_count"          INT4,
    1.15          "satisfied_informed_supporter_count" INT4,
    1.16 -        "harmonic_weight"       NUMERIC(12, 2),
    1.17 +        "harmonic_weight"       NUMERIC(12, 3),
    1.18          "positive_votes"        INT4,
    1.19          "negative_votes"        INT4,
    1.20          "direct_majority"       BOOLEAN,
    1.21 @@ -772,7 +772,7 @@
    1.22          "plus1_fulfilled_count"    INT4,
    1.23          "plus2_unfulfilled_count"  INT4,
    1.24          "plus2_fulfilled_count"    INT4,
    1.25 -        "harmonic_weight"       NUMERIC(12, 2) );
    1.26 +        "harmonic_weight"       NUMERIC(12, 3) );
    1.27  CREATE INDEX "suggestion_created_idx" ON "suggestion" ("created");
    1.28  CREATE INDEX "suggestion_author_id_created_idx" ON "suggestion" ("author_id", "created");
    1.29  CREATE INDEX "suggestion_text_search_data_idx" ON "suggestion" USING gin ("text_search_data");
    1.30 @@ -3141,7 +3141,7 @@
    1.31          EXIT WHEN "count_v" = 0;
    1.32          "i" := 1;
    1.33          LOOP
    1.34 -          "weight_ary"["i"] := "weight_ary"["i"]::NUMERIC(20,10)::NUMERIC(12,2);
    1.35 +          "weight_ary"["i"] := "weight_ary"["i"]::NUMERIC(18,9)::NUMERIC(12,3);
    1.36            IF "min_weight_v" ISNULL OR "weight_ary"["i"] < "min_weight_v" THEN
    1.37              "min_weight_v" := "weight_ary"["i"];
    1.38            END IF;
    1.39 @@ -3251,7 +3251,7 @@
    1.40          EXIT WHEN "count_v" = 0;
    1.41          "i" := 1;
    1.42          LOOP
    1.43 -          "weight_ary"["i"] := "weight_ary"["i"]::NUMERIC(20,10)::NUMERIC(12,2);
    1.44 +          "weight_ary"["i"] := "weight_ary"["i"]::NUMERIC(18,9)::NUMERIC(12,3);
    1.45            IF "min_weight_v" ISNULL OR "weight_ary"["i"] < "min_weight_v" THEN
    1.46              "min_weight_v" := "weight_ary"["i"];
    1.47            END IF;

Impressum / About Us