users: store timezone, default is "UTC"

This commit is contained in:
Philippe Loctaux 2023-04-13 22:01:27 +02:00
parent 1168e1494c
commit e49c146dfd
14 changed files with 415 additions and 322 deletions

View file

@ -8,7 +8,8 @@ select u.id,
u.password,
u.password_recover,
u.paper_key,
u.is_archived as "is_archived: bool"
u.is_archived as "is_archived: bool",
u.timezone
from users u
inner join settings s on u.id = s.first_admin

View file

@ -8,7 +8,8 @@ select id,
password,
password_recover,
paper_key,
is_archived as "is_archived: bool"
is_archived as "is_archived: bool",
timezone
from users
where email is (?)

View file

@ -8,7 +8,8 @@ select id,
password,
password_recover,
paper_key,
is_archived as "is_archived: bool"
is_archived as "is_archived: bool",
timezone
from users
where id is (?)

View file

@ -8,7 +8,8 @@ select id,
password,
password_recover,
paper_key,
is_archived as "is_archived: bool"
is_archived as "is_archived: bool",
timezone
from users
where username is (?)

View file

@ -8,7 +8,8 @@ select u.id,
u.password,
u.password_recover,
u.paper_key,
u.is_archived as "is_archived: bool"
u.is_archived as "is_archived: bool",
u.timezone
from users u
inner join authorization_codes ac on u.id = ac.user

View file

@ -8,7 +8,8 @@ select u.id,
u.password,
u.password_recover,
u.paper_key,
u.is_archived as "is_archived: bool"
u.is_archived as "is_archived: bool",
u.timezone
from users u
inner join refresh_tokens rt on u.id = rt.user

View file

@ -0,0 +1,5 @@
update users
set timezone = ?
where id is ?