mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-25 12:37:02 +03:00
20 lines
375 B
MySQL
20 lines
375 B
MySQL
|
ALTER TABLE event
|
||
|
ADD "date" bigint,
|
||
|
ADD "dueDate" bigint,
|
||
|
add calendar text,
|
||
|
ADD "participants" text[];
|
||
|
|
||
|
UPDATE event
|
||
|
SET "date" = (data->>'date')::bigint;
|
||
|
|
||
|
UPDATE event
|
||
|
SET "dueDate" = (data->>'dueDate')::bigint;
|
||
|
|
||
|
UPDATE calendar
|
||
|
SET "calendar" = (data->>'calendar');
|
||
|
|
||
|
UPDATE event
|
||
|
SET "participants" = array(
|
||
|
SELECT jsonb_array_elements_text(data->'participants')
|
||
|
);
|