summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-02-10 14:48:01 +0100
committerYorhel <git@yorhel.nl>2022-02-10 14:48:01 +0100
commit24a86620d561a5efc563bc130874a8a0ab2fd1ea (patch)
tree4ced3224f915c4f890821b70b254fd290169d790 /util
parent727a4d84255f13badffe16c5858fdb036ddcdbce (diff)
Add title language user preference
Diffstat (limited to 'util')
-rw-r--r--util/updates/wip-vn-titles.sql2
-rwxr-xr-xutil/vndb.pl1
2 files changed, 3 insertions, 0 deletions
diff --git a/util/updates/wip-vn-titles.sql b/util/updates/wip-vn-titles.sql
index b8162ea7..58dd31a2 100644
--- a/util/updates/wip-vn-titles.sql
+++ b/util/updates/wip-vn-titles.sql
@@ -35,6 +35,8 @@ ALTER TABLE vn RENAME COLUMN title TO old_title;
CREATE VIEW vnt AS SELECT v.*, COALESCE(vo.latin, vo.title) AS title, CASE WHEN vo.latin IS NULL THEN '' ELSE vo.title END AS alttitle FROM vn v JOIN vn_titles vo ON vo.id = v.id AND vo.lang = v.olang;
+ALTER TABLE users ADD COLUMN title_langs jsonb, ADD COLUMN alttitle_langs jsonb;
+
COMMIT;
\i sql/func.sql
\i sql/editfunc.sql
diff --git a/util/vndb.pl b/util/vndb.pl
index 54155e04..b46d409a 100755
--- a/util/vndb.pl
+++ b/util/vndb.pl
@@ -22,6 +22,7 @@ use VNDB::Config;
use VNWeb::Auth;
use VNWeb::HTML ();
use VNWeb::Validation ();
+use VNWeb::LangPref ();
TUWF::set %{ config->{tuwf} };