diff --git a/backend/documents/migrations/0014_migrate_comments_to_communications.py b/backend/documents/migrations/0014_migrate_comments_to_communications.py index 56bcec88..2e285083 100644 --- a/backend/documents/migrations/0014_migrate_comments_to_communications.py +++ b/backend/documents/migrations/0014_migrate_comments_to_communications.py @@ -9,13 +9,15 @@ def migrate_comments_forward(apps, schema_editor): # 1. Создаем чаты для документов с комментариями schema_editor.execute(""" INSERT INTO communications_chat ( - type, name, created_by_id, can_reply, flags, + type, name, description, avatar, created_by_id, can_reply, flags, context_content_type_id, context_object_id, created_at, is_main, is_blocked, include_all_users, extra_data ) SELECT DISTINCT 'comments', 'Комментарии: ' || substr(d.title, 1, 50), + '', + NULL, NULL::bigint, TRUE, '{"allow_replies": true, "allow_reactions": true, "allow_attachments": true, "allow_editing": true}'::jsonb, diff --git a/backend/feed/migrations/0006_migrate_comments_to_communications.py b/backend/feed/migrations/0006_migrate_comments_to_communications.py index 3f05b3c9..28a320bc 100644 --- a/backend/feed/migrations/0006_migrate_comments_to_communications.py +++ b/backend/feed/migrations/0006_migrate_comments_to_communications.py @@ -9,13 +9,15 @@ def migrate_comments_forward(apps, schema_editor): # 1. Создаем чаты для постов с комментариями schema_editor.execute(""" INSERT INTO communications_chat ( - type, name, created_by_id, can_reply, flags, + type, name, description, avatar, created_by_id, can_reply, flags, context_content_type_id, context_object_id, created_at, is_main, is_blocked, include_all_users, extra_data ) SELECT DISTINCT 'comments', 'Комментарии: ' || substr(p.title, 1, 50), + '', + NULL, NULL::bigint, TRUE, '{"allow_replies": true, "allow_reactions": true, "allow_attachments": true, "allow_editing": true}'::jsonb, diff --git a/backend/requests_app/migrations/0010_migrate_comments_to_communications.py b/backend/requests_app/migrations/0010_migrate_comments_to_communications.py index 367cdbf8..77e20f4c 100644 --- a/backend/requests_app/migrations/0010_migrate_comments_to_communications.py +++ b/backend/requests_app/migrations/0010_migrate_comments_to_communications.py @@ -9,13 +9,15 @@ def migrate_comments_forward(apps, schema_editor): # 1. Создаем чаты для заявок с комментариями schema_editor.execute(""" INSERT INTO communications_chat ( - type, name, created_by_id, can_reply, flags, + type, name, description, avatar, created_by_id, can_reply, flags, context_content_type_id, context_object_id, created_at, is_main, is_blocked, include_all_users, extra_data ) SELECT DISTINCT 'comments', 'Комментарии к заявке #' || rc.request_id, + '', + NULL, NULL::bigint, TRUE, '{"allow_replies": true, "allow_reactions": true, "allow_attachments": true, "allow_editing": true}'::jsonb,