[MM-53291] Data retention improvements (#24253)
* adding new migration for RetentionIdsForDeletion, changing logic for deleting orphaned reactions. Updating delete user and channel endpoints to remove respective reactions
Этот коммит содержится в:
@@ -222,6 +222,8 @@ channels/db/migrations/mysql/000111_update_vacuuming.down.sql
|
||||
channels/db/migrations/mysql/000111_update_vacuuming.up.sql
|
||||
channels/db/migrations/mysql/000112_rework_desktop_tokens.down.sql
|
||||
channels/db/migrations/mysql/000112_rework_desktop_tokens.up.sql
|
||||
channels/db/migrations/mysql/000113_create_retentionidsfordeletion_table.down.sql
|
||||
channels/db/migrations/mysql/000113_create_retentionidsfordeletion_table.up.sql
|
||||
channels/db/migrations/postgres/000001_create_teams.down.sql
|
||||
channels/db/migrations/postgres/000001_create_teams.up.sql
|
||||
channels/db/migrations/postgres/000002_create_team_members.down.sql
|
||||
@@ -444,3 +446,5 @@ channels/db/migrations/postgres/000111_update_vacuuming.down.sql
|
||||
channels/db/migrations/postgres/000111_update_vacuuming.up.sql
|
||||
channels/db/migrations/postgres/000112_rework_desktop_tokens.down.sql
|
||||
channels/db/migrations/postgres/000112_rework_desktop_tokens.up.sql
|
||||
channels/db/migrations/postgres/000113_create_retentionidsfordeletion_table.down.sql
|
||||
channels/db/migrations/postgres/000113_create_retentionidsfordeletion_table.up.sql
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS RetentionIdsForDeletion;
|
||||
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS RetentionIdsForDeletion (
|
||||
Id varchar(26) NOT NULL,
|
||||
TableName varchar(64),
|
||||
Ids json,
|
||||
PRIMARY KEY (Id),
|
||||
KEY idx_retentionidsfordeletion_tablename (TableName)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
@@ -0,0 +1,3 @@
|
||||
DROP INDEX IF EXISTS idx_retentionidsfordeletion_tablename;
|
||||
|
||||
DROP TABLE IF EXISTS retentionidsfordeletion;
|
||||
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS retentionidsfordeletion (
|
||||
id varchar(26) PRIMARY KEY,
|
||||
tablename varchar(64),
|
||||
ids varchar(26)[]
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_retentionidsfordeletion_tablename ON retentionidsfordeletion (tablename);
|
||||
Ссылка в новой задаче
Block a user