-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Write a test case * Fix app rating upsert issue * Add migration script * Remove rating sum from migration
- Loading branch information
1 parent
292f84f
commit e8b8dcc
Showing
6 changed files
with
97 additions
and
13 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
hasura/migrations/default/1737035548134_recalculate_app_ratings/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- UPDATE app | ||
-- SET | ||
-- rating_count = ( | ||
-- SELECT COUNT(*) | ||
-- FROM app_reviews | ||
-- WHERE app_reviews.app_id = app.id | ||
-- ); |
7 changes: 7 additions & 0 deletions
7
hasura/migrations/default/1737035548134_recalculate_app_ratings/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
UPDATE app | ||
SET | ||
rating_count = ( | ||
SELECT COUNT(*) | ||
FROM app_reviews | ||
WHERE app_reviews.app_id = app.id | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
web/api/v2/app/submit-app-review/graphql/update-review-counter.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters