From: Dessalines Date: Sat, 6 Apr 2019 17:01:02 +0000 (-0700) Subject: Travis X-Git-Url: http://these/git/%22https:/github.com/LemmyNet/lemmy/issues/README.es.md?a=commitdiff_plain;h=58bf6c165558b4d1c22f51f5471c2dd742071b03;p=lemmy.git Travis --- diff --git a/.travis.yml b/.travis.yml index 84d9cf83..69c6bb17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,4 +22,4 @@ script: env: - DATABASE_URL=postgres://rrr:rrr@localhost/rrr addons: - postgresql: "10" + postgresql: "9.4" diff --git a/server/migrations/2019-03-30-212058_create_post_view/up.sql b/server/migrations/2019-03-30-212058_create_post_view/up.sql index 79084a47..95789c73 100644 --- a/server/migrations/2019-03-30-212058_create_post_view/up.sql +++ b/server/migrations/2019-03-30-212058_create_post_view/up.sql @@ -5,7 +5,7 @@ create or replace function hot_rank( returns integer as $$ begin -- hours_diff:=EXTRACT(EPOCH FROM (timezone('utc',now()) - published))/3600 - return 10000*sign(score)*log(1 + abs(score)) / power(((EXTRACT(EPOCH FROM (timezone('utc',now()) - published))/3600) + 2), 1.8); + return floor(10000*sign(score)*log(1 + abs(score)) / power(((EXTRACT(EPOCH FROM (timezone('utc',now()) - published))/3600) + 2), 1.8))::integer; end; $$ LANGUAGE plpgsql;