From 0e133a46339b38165adbd5d157eb3401b6030d9d Mon Sep 17 00:00:00 2001 From: lizerk Date: Thu, 12 Mar 2026 01:01:53 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0014_migrate_comments_to_communications.py | 4 +++- .../migrations/0006_migrate_comments_to_communications.py | 4 +++- .../migrations/0010_migrate_comments_to_communications.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) 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,