DB refactor and fix issues related to tags and aliases

1. add a `page` filter.
2. keep word case for both page and block's properties
3. remove `:tag/name` from the db schema

Fixed #1031
This commit is contained in:
Tienson Qin
2021-01-02 18:27:48 +08:00
parent 8f6d16d041
commit 48b6ccbdca
14 changed files with 158 additions and 202 deletions

View File

@@ -104,8 +104,7 @@
(let [page (string/lower-case page)
page-entity (db/entity [:page/name page])
original-page-name (:page/original-name page-entity)
tags (->> (:page/tags page-entity)
(map :tag/name))
tags (:tags (:page/properties page-entity))
tags (remove #(= page %) tags)
ref-pages (db/get-page-referenced-pages repo page)
mentioned-pages (db/get-pages-that-mentioned-page repo page)