Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
15 строки
427 B
SQL
15 строки
427 B
SQL
SET @preparedStatement = (SELECT IF(
|
|
(
|
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
|
|
WHERE table_name = 'Configurations'
|
|
AND table_schema = DATABASE()
|
|
AND column_name = 'SHA'
|
|
) > 0,
|
|
'SELECT 1',
|
|
'ALTER TABLE Configurations ADD COLUMN SHA char(64) DEFAULT "";'
|
|
));
|
|
|
|
PREPARE alterIfNotExists FROM @preparedStatement;
|
|
EXECUTE alterIfNotExists;
|
|
DEALLOCATE PREPARE alterIfNotExists;
|