SET @column_exists := (
  SELECT COUNT(*)
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE TABLE_SCHEMA = DATABASE()
    AND TABLE_NAME = 'contas_usuarios'
    AND COLUMN_NAME = 'usa_modo_entrega'
);

SET @sql := IF(
  @column_exists = 0,
  "ALTER TABLE contas_usuarios ADD COLUMN usa_modo_entrega CHAR(1) NOT NULL DEFAULT 'N' COMMENT 'S - habilita telas e fluxos de entrega, N - oculta entrega' AFTER tipo",
  "SELECT 'Column usa_modo_entrega already exists' AS message"
);

PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
