configure playing status

This commit is contained in:
jude
2022-05-13 12:43:27 +01:00
parent d7a0b727fb
commit 8bad95510d
3 changed files with 20 additions and 2 deletions

View File

@ -32,3 +32,20 @@ CREATE TABLE reminder_template (
);
ALTER TABLE reminders ADD COLUMN embed_fields JSON;
update reminders
inner join embed_fields as E
on E.reminder_id = reminders.id
set embed_fields = (
select JSON_ARRAYAGG(
JSON_OBJECT(
'title', E.title,
'value', E.value,
'inline',
if(inline = 1, cast(TRUE as json), cast(FALSE as json))
)
)
from embed_fields
group by reminder_id
having reminder_id = reminders.id
);