MM-62751: [Shared Channels] Allow remote users to be discoverable in the create DM/GM modal (#30918)

Этот коммит содержится в:
catalintomai
2025-06-13 16:51:12 +02:00
коммит произвёл GitHub
родитель 476b46d1d7
Коммит c46ed6c681
24 изменённых файлов: 2133 добавлений и 38 удалений

Просмотреть файл

@@ -273,6 +273,8 @@ channels/db/migrations/mysql/000137_update_attribute_view.down.sql
channels/db/migrations/mysql/000137_update_attribute_view.up.sql
channels/db/migrations/mysql/000138_add_default_category_name_to_channel.down.sql
channels/db/migrations/mysql/000138_add_default_category_name_to_channel.up.sql
channels/db/migrations/mysql/000139_remoteclusters_add_last_global_user_sync_at.down.sql
channels/db/migrations/mysql/000139_remoteclusters_add_last_global_user_sync_at.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
@@ -547,3 +549,5 @@ channels/db/migrations/postgres/000137_update_attribute_view.down.sql
channels/db/migrations/postgres/000137_update_attribute_view.up.sql
channels/db/migrations/postgres/000138_add_default_category_name_to_channel.down.sql
channels/db/migrations/postgres/000138_add_default_category_name_to_channel.up.sql
channels/db/migrations/postgres/000139_remoteclusters_add_last_global_user_sync_at.down.sql
channels/db/migrations/postgres/000139_remoteclusters_add_last_global_user_sync_at.up.sql

Просмотреть файл

@@ -0,0 +1,14 @@
SET @preparedStatement = (SELECT IF(
(
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'RemoteClusters'
AND COLUMN_NAME = 'LastGlobalUserSyncAt'
) > 0,
'ALTER TABLE RemoteClusters DROP COLUMN LastGlobalUserSyncAt',
'SELECT 1'
));
PREPARE alterIfExists FROM @preparedStatement;
EXECUTE alterIfExists;
DEALLOCATE PREPARE alterIfExists;

Просмотреть файл

@@ -0,0 +1,14 @@
SET @preparedStatement = (SELECT IF(
(
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'RemoteClusters'
AND COLUMN_NAME = 'LastGlobalUserSyncAt'
) > 0,
'SELECT 1',
'ALTER TABLE RemoteClusters ADD COLUMN LastGlobalUserSyncAt bigint DEFAULT 0'
));
PREPARE alterIfNotExists FROM @preparedStatement;
EXECUTE alterIfNotExists;
DEALLOCATE PREPARE alterIfNotExists;

Просмотреть файл

@@ -0,0 +1 @@
ALTER TABLE remoteclusters DROP COLUMN IF EXISTS lastglobalusersyncat;

Просмотреть файл

@@ -0,0 +1 @@
ALTER TABLE remoteclusters ADD COLUMN IF NOT EXISTS lastglobalusersyncat bigint DEFAULT 0;