store views on the shouts table, remove the viewed table

This commit is contained in:
Alexey Kulikov
2023-07-30 23:57:31 +01:00
parent 18e5cd4747
commit 41055d8501
6 changed files with 14 additions and 101 deletions

View File

@@ -193,7 +193,7 @@ async def migrate(entry, storage):
await content_ratings_to_reactions(entry, shout_dict["slug"])
# shout views
await ViewedStorage.increment(shout_dict["slug"], amount=entry.get("views", 1), viewer='old-discours')
await ViewedStorage.increment(shout_dict["slug"], amount=entry.get("views", 1))
# del shout_dict['ratings']
storage["shouts"]["by_oid"][entry["_id"]] = shout_dict