auto-visibility, schema upgrades

This commit is contained in:
2022-11-13 18:24:29 +03:00
parent 2e705fa2c9
commit 941f8cdd71
5 changed files with 101 additions and 8 deletions

View File

@@ -148,6 +148,9 @@ async def migrate(entry, storage):
r["updatedAt"] = date_parse(entry["updatedAt"]) if "updatedAt" in entry else ts
if entry.get("published"):
r["publishedAt"] = date_parse(entry.get("publishedAt", OLD_DATE))
r["visibility"] = "public"
else:
r["visibility"] = "authors"
if "deletedAt" in entry:
r["deletedAt"] = date_parse(entry["deletedAt"])