-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IPCT1-486] - replace community state #147
Conversation
7f61d04
to
645ec14
Compare
25e92c0
to
44a671f
Compare
@obernardovieira ready to review |
@@ -40,18 +40,18 @@ | |||
* description: Number of unique backers since contract inception | |||
*/ | |||
export interface UbiCommunityState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove all instances of the community state table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but do not add a drop table yet (needs to be at a later stage)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
I kept only the interface
-- SELECT SUM(raised + NEW.amount) INTO state_raised FROM ubi_community_state WHERE "communityId"=community_id; | ||
-- UPDATE ubi_community_state SET raised = state_raised WHERE "communityId"=community_id; | ||
-- SELECT SUM(raised + NEW.amount) INTO state_daily_raised FROM ubi_community_daily_state WHERE "communityId"=community_id AND date=DATE(NEW."txAt"); | ||
-- UPDATE ubi_community_daily_state SET raised = state_daily_raised WHERE "communityId"=community_id AND date=DATE(NEW."txAt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed unused lines on this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Feels like we are getting to the other side of the tunnel 👀 |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This PR fixes [IPCT1-486] at https://impactmarket.atlassian.net/browse/IPCT1-486
Changes
removed triggers on tables:
edited triggers on table:
changed get community state to get the previous state + today's state
New
Tests