liquid_feedback_core
changeset 494:b4b660562322
Another bugfix in function "get_initiatives_for_notification"
author | jbe |
---|---|
date | Sun Apr 03 20:00:20 2016 +0200 (2016-04-03) |
parents | d932363da4ee |
children | bb420abbc2fa |
files | core.sql update/core-update.v3.1.0-v3.2.0.sql |
line diff
1.1 --- a/core.sql Sun Apr 03 19:57:11 2016 +0200 1.2 +++ b/core.sql Sun Apr 03 20:00:20 2016 +0200 1.3 @@ -3127,13 +3127,13 @@ 1.4 "last_suggestion_id_v" ) 1.5 ON CONFLICT ("member_id", "initiative_id") DO UPDATE SET 1.6 "last_draft_id" = CASE 1.7 - WHEN "last_draft_id" > "last_draft_id_v" 1.8 - THEN "last_draft_id" 1.9 + WHEN "initiative_notification_sent"."last_draft_id" > "last_draft_id_v" 1.10 + THEN "initiative_notification_sent"."last_draft_id" 1.11 ELSE "last_draft_id_v" 1.12 END, 1.13 "last_suggestion_id" = CASE 1.14 - WHEN "last_suggestion_id" > "last_suggestion_id_v" 1.15 - THEN "last_suggestion_id" 1.16 + WHEN "initiative_notification_sent"."last_suggestion_id" > "last_suggestion_id_v" 1.17 + THEN "initiative_notification_sent"."last_suggestion_id" 1.18 ELSE "last_suggestion_id_v" 1.19 END; 1.20 RETURN NEXT "result_row";
2.1 --- a/update/core-update.v3.1.0-v3.2.0.sql Sun Apr 03 19:57:11 2016 +0200 2.2 +++ b/update/core-update.v3.1.0-v3.2.0.sql Sun Apr 03 20:00:20 2016 +0200 2.3 @@ -291,13 +291,13 @@ 2.4 "last_suggestion_id_v" ) 2.5 ON CONFLICT ("member_id", "initiative_id") DO UPDATE SET 2.6 "last_draft_id" = CASE 2.7 - WHEN "last_draft_id" > "last_draft_id_v" 2.8 - THEN "last_draft_id" 2.9 + WHEN "initiative_notification_sent"."last_draft_id" > "last_draft_id_v" 2.10 + THEN "initiative_notification_sent"."last_draft_id" 2.11 ELSE "last_draft_id_v" 2.12 END, 2.13 "last_suggestion_id" = CASE 2.14 - WHEN "last_suggestion_id" > "last_suggestion_id_v" 2.15 - THEN "last_suggestion_id" 2.16 + WHEN "initiative_notification_sent"."last_suggestion_id" > "last_suggestion_id_v" 2.17 + THEN "initiative_notification_sent"."last_suggestion_id" 2.18 ELSE "last_suggestion_id_v" 2.19 END; 2.20 RETURN NEXT "result_row";