hunk.code_window: 	"github.com/pkg/errors"
   	"github.com/spf13/cobra"
   	"github.com/mattermost/mattermost-server/v6/audit"
   	"github.com/mattermost/mattermost-server/v6/config"
   	"github.com/mattermost/mattermost-server/v6/store/sqlstore"
   )
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit: 	"github.com/mattermost/mattermost-server/v6/app"
  
hunk.file_path: cmd/mattermost/commands/db.go
hunk.type: add
file: SET @preparedStatement = (SELECT IF(
      (
          SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
          WHERE table_name = 'FileInfo'
          AND table_schema = DATABASE()
          AND column_name = 'Archived'
      ) > 0,
      'ALTER TABLE FileInfo DROP COLUMN Archived;',
      'SELECT 1'
  ));
  
  PREPARE alterIfExists FROM @preparedStatement;
  EXECUTE alterIfExists;
  DEALLOCATE PREPARE alterIfExists;
  