diff options
author | Dessalines <tyhou13@gmx.com> | 2019-04-06 10:01:02 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-04-06 10:01:02 -0700 |
commit | 58bf6c165558b4d1c22f51f5471c2dd742071b03 (patch) | |
tree | 3b03449b9e0866686e34e605b0669f73d10cd643 /server/migrations | |
parent | 2dae757ad9d20bca9dcad0b111378dd69b9599a2 (diff) |
Travis
Diffstat (limited to 'server/migrations')
-rw-r--r-- | server/migrations/2019-03-30-212058_create_post_view/up.sql | 2 |
1 files changed, 1 insertions, 1 deletions
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; |