mirror of
https://github.com/hanzoai/team.git
synced 2026-10-30 14:49:35 +00:00
* - columns added to ShareChannelRemotes: lastpostcreateat, lastpostupdateat - SyncMsg and SyncResponse moved to `model` package - field added to RemoteCluster struct: PluginID * sync new posts before updated posts to ensure post order in MS Teams * add plugid to remoteclusters table and store * don't sync history by default
48 lines
1.3 KiB
SQL
48 lines
1.3 KiB
SQL
SET @preparedStatement = (SELECT IF(
|
|
EXISTS(
|
|
SELECT 1 FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE table_name = 'RemoteClusters'
|
|
AND table_schema = DATABASE()
|
|
AND column_name = 'PluginID'
|
|
),
|
|
'ALTER TABLE RemoteClusters DROP COLUMN PluginID;',
|
|
'SELECT 1;'
|
|
));
|
|
|
|
PREPARE removeColumnIfExists FROM @preparedStatement;
|
|
EXECUTE removeColumnIfExists;
|
|
DEALLOCATE PREPARE removeColumnIfExists;
|
|
|
|
|
|
SET @preparedStatement = (SELECT IF(
|
|
EXISTS(
|
|
SELECT 1 FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE table_name = 'SharedChannelRemotes'
|
|
AND table_schema = DATABASE()
|
|
AND column_name = 'LastPostCreateAt'
|
|
),
|
|
'ALTER TABLE SharedChannelRemotes DROP COLUMN LastPostCreateAt;',
|
|
'SELECT 1;'
|
|
));
|
|
|
|
PREPARE removeColumnIfExists FROM @preparedStatement;
|
|
EXECUTE removeColumnIfExists;
|
|
DEALLOCATE PREPARE removeColumnIfExists;
|
|
|
|
|
|
SET @preparedStatement = (SELECT IF(
|
|
EXISTS(
|
|
SELECT 1 FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE table_name = 'SharedChannelRemotes'
|
|
AND table_schema = DATABASE()
|
|
AND column_name = 'LastPostCreateID'
|
|
),
|
|
'ALTER TABLE SharedChannelRemotes DROP COLUMN LastPostCreateID;',
|
|
'SELECT 1;'
|
|
));
|
|
|
|
PREPARE removeColumnIfExists FROM @preparedStatement;
|
|
EXECUTE removeColumnIfExists;
|
|
DEALLOCATE PREPARE removeColumnIfExists;
|
|
|