[MM-48029] notify admin for plugin install from work templates (#22007)
Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Julien Tant <julien@craftyx.fr>
Этот коммит содержится в:
@@ -204,6 +204,10 @@ db/migrations/mysql/000101_create_true_up_review_history.down.sql
|
||||
db/migrations/mysql/000101_create_true_up_review_history.up.sql
|
||||
db/migrations/mysql/000102_posts_originalid_index.down.sql
|
||||
db/migrations/mysql/000102_posts_originalid_index.up.sql
|
||||
db/migrations/mysql/000103_add_sentat_to_notifyadmin.down.sql
|
||||
db/migrations/mysql/000103_add_sentat_to_notifyadmin.up.sql
|
||||
db/migrations/mysql/000104_upgrade_notifyadmin.down.sql
|
||||
db/migrations/mysql/000104_upgrade_notifyadmin.up.sql
|
||||
db/migrations/postgres/000001_create_teams.down.sql
|
||||
db/migrations/postgres/000001_create_teams.up.sql
|
||||
db/migrations/postgres/000002_create_team_members.down.sql
|
||||
@@ -408,3 +412,7 @@ db/migrations/postgres/000101_create_true_up_review_history.down.sql
|
||||
db/migrations/postgres/000101_create_true_up_review_history.up.sql
|
||||
db/migrations/postgres/000102_posts_originalid_index.down.sql
|
||||
db/migrations/postgres/000102_posts_originalid_index.up.sql
|
||||
db/migrations/postgres/000103_add_sentat_to_notifyadmin.down.sql
|
||||
db/migrations/postgres/000103_add_sentat_to_notifyadmin.up.sql
|
||||
db/migrations/postgres/000104_upgrade_notifyadmin.down.sql
|
||||
db/migrations/postgres/000104_upgrade_notifyadmin.up.sql
|
||||
|
||||
14
db/migrations/mysql/000103_add_sentat_to_notifyadmin.down.sql
Обычный файл
14
db/migrations/mysql/000103_add_sentat_to_notifyadmin.down.sql
Обычный файл
@@ -0,0 +1,14 @@
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
EXISTS(
|
||||
SELECT 1 FROM INFORMATION_SCHEMA.STATISTICS
|
||||
WHERE table_name = 'NotifyAdmin'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'SentAt'
|
||||
) > 0,
|
||||
'ALTER TABLE NotifyAdmin DROP COLUMN SentAt;',
|
||||
'SELECT 1;'
|
||||
));
|
||||
|
||||
PREPARE removeColumnIfExists FROM @preparedStatement;
|
||||
EXECUTE removeColumnIfExists;
|
||||
DEALLOCATE PREPARE removeColumnIfExists;
|
||||
14
db/migrations/mysql/000103_add_sentat_to_notifyadmin.up.sql
Обычный файл
14
db/migrations/mysql/000103_add_sentat_to_notifyadmin.up.sql
Обычный файл
@@ -0,0 +1,14 @@
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
NOT EXISTS(
|
||||
SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'NotifyAdmin'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'SentAt'
|
||||
),
|
||||
'ALTER TABLE NotifyAdmin ADD COLUMN SentAt bigint DEFAULT NULL;',
|
||||
'SELECT 1;'
|
||||
));
|
||||
|
||||
PREPARE addColumnIfNotExists FROM @preparedStatement;
|
||||
EXECUTE addColumnIfNotExists;
|
||||
DEALLOCATE PREPARE addColumnIfNotExists;
|
||||
29
db/migrations/mysql/000104_upgrade_notifyadmin.down.sql
Обычный файл
29
db/migrations/mysql/000104_upgrade_notifyadmin.down.sql
Обычный файл
@@ -0,0 +1,29 @@
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
(
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'NotifyAdmin'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'RequiredFeature'
|
||||
AND column_type != 'varchar(100)'
|
||||
) > 0,
|
||||
'ALTER TABLE NotifyAdmin MODIFY COLUMN RequiredFeature varchar(100);',
|
||||
'SELECT 1'
|
||||
));
|
||||
PREPARE alterIfExists FROM @preparedStatement;
|
||||
EXECUTE alterIfExists;
|
||||
DEALLOCATE PREPARE alterIfExists;
|
||||
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
(
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'NotifyAdmin'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'RequiredPlan'
|
||||
AND column_type != 'varchar(26)'
|
||||
) > 0,
|
||||
'ALTER TABLE NotifyAdmin MODIFY COLUMN RequiredPlan varchar(26);',
|
||||
'SELECT 1'
|
||||
));
|
||||
PREPARE alterIfExists FROM @preparedStatement;
|
||||
EXECUTE alterIfExists;
|
||||
DEALLOCATE PREPARE alterIfExists;
|
||||
29
db/migrations/mysql/000104_upgrade_notifyadmin.up.sql
Обычный файл
29
db/migrations/mysql/000104_upgrade_notifyadmin.up.sql
Обычный файл
@@ -0,0 +1,29 @@
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
(
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'NotifyAdmin'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'RequiredFeature'
|
||||
AND column_type != 'varchar(255)'
|
||||
) > 0,
|
||||
'ALTER TABLE NotifyAdmin MODIFY COLUMN RequiredFeature varchar(255);',
|
||||
'SELECT 1'
|
||||
));
|
||||
PREPARE alterIfExists FROM @preparedStatement;
|
||||
EXECUTE alterIfExists;
|
||||
DEALLOCATE PREPARE alterIfExists;
|
||||
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
(
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'NotifyAdmin'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'RequiredPlan'
|
||||
AND column_type != 'varchar(100)'
|
||||
) > 0,
|
||||
'ALTER TABLE NotifyAdmin MODIFY COLUMN RequiredPlan varchar(100);',
|
||||
'SELECT 1'
|
||||
));
|
||||
PREPARE alterIfExists FROM @preparedStatement;
|
||||
EXECUTE alterIfExists;
|
||||
DEALLOCATE PREPARE alterIfExists;
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE NotifyAdmin DROP COLUMN IF EXISTS SentAt;
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE NotifyAdmin ADD COLUMN IF NOT EXISTS SentAt bigint DEFAULT NULL;
|
||||
2
db/migrations/postgres/000104_upgrade_notifyadmin.down.sql
Обычный файл
2
db/migrations/postgres/000104_upgrade_notifyadmin.down.sql
Обычный файл
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE NotifyAdmin ALTER COLUMN RequiredFeature TYPE VARCHAR(100);
|
||||
ALTER TABLE NotifyAdmin ALTER COLUMN RequiredPlan TYPE VARCHAR(26);
|
||||
2
db/migrations/postgres/000104_upgrade_notifyadmin.up.sql
Обычный файл
2
db/migrations/postgres/000104_upgrade_notifyadmin.up.sql
Обычный файл
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE NotifyAdmin ALTER COLUMN RequiredFeature TYPE VARCHAR(255);
|
||||
ALTER TABLE NotifyAdmin ALTER COLUMN RequiredPlan TYPE VARCHAR(100);
|
||||
Ссылка в новой задаче
Block a user