github.com/mattermost/mattermost-server/v6@v6.7.2/config/migrations/mysql/000003_update_configurations_sha.down.sql (about)

     1  SET @preparedStatement = (SELECT IF(
     2      (
     3          SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
     4          WHERE table_name = 'Configurations'
     5          AND table_schema = DATABASE()
     6          AND column_name = 'SHA'
     7      ) > 0,
     8      'ALTER TABLE Configurations DROP COLUMN SHA;',
     9      'SELECT 1'
    10  ));
    11  
    12  PREPARE alterIfExists FROM @preparedStatement;
    13  EXECUTE alterIfExists;
    14  DEALLOCATE PREPARE alterIfExists;