2026-05-01 20:49:37 +00:00
|
|
|
-- +goose Up
|
|
|
|
|
INSERT INTO communication (
|
|
|
|
|
created,
|
|
|
|
|
--id,
|
|
|
|
|
organization_id,
|
|
|
|
|
response_email_log_id,
|
|
|
|
|
response_text_log_id,
|
|
|
|
|
source_email_log_id,
|
|
|
|
|
source_report_id,
|
2026-05-07 10:39:17 +00:00
|
|
|
source_text_log_id,
|
|
|
|
|
status
|
2026-05-01 20:49:37 +00:00
|
|
|
) SELECT
|
|
|
|
|
created,
|
|
|
|
|
organization_id,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
2026-05-07 10:39:17 +00:00
|
|
|
id,
|
2026-05-01 20:49:37 +00:00
|
|
|
NULL,
|
2026-05-07 10:39:17 +00:00
|
|
|
'new'
|
|
|
|
|
FROM publicreport.report;
|
|
|
|
|
INSERT INTO communication_log_entry (
|
|
|
|
|
communication_id,
|
|
|
|
|
created,
|
|
|
|
|
--id,
|
|
|
|
|
type_,
|
|
|
|
|
user_
|
|
|
|
|
) SELECT
|
2026-05-01 20:49:37 +00:00
|
|
|
id,
|
2026-05-07 10:39:17 +00:00
|
|
|
created,
|
|
|
|
|
'created',
|
2026-05-01 20:49:37 +00:00
|
|
|
NULL
|
2026-05-07 10:39:17 +00:00
|
|
|
FROM communication;
|
2026-05-01 20:49:37 +00:00
|
|
|
-- +goose Down
|
2026-05-07 10:39:17 +00:00
|
|
|
DELETE FROM communication_log_entry;
|
2026-05-01 20:49:37 +00:00
|
|
|
DELETE FROM communication;
|