mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-25 04:25:13 +03:00
76bcd3c52c
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
20 lines
375 B
SQL
20 lines
375 B
SQL
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')
|
|
);
|