public void init(DatabaseMetaData metaData) throws SQLException {
checkDbVersion(metaData, MIN_SUPPORTED_VERSION);
- Loggers.get(getClass()).warn("MySQL support is deprecated and will be dropped soon.");
+ String message = "\n" +
+ "#############################################################################################################\n" +
+ "# End of Life of MySQL Support : SonarQube 7.8 is the last version that will support MySQL. #\n" +
+ "# Please consider migrating to a supported database. Get the migration detail on #\n" +
+ "# https://community.sonarsource.com/t/end-of-life-of-mysql-support #\n" +
+ "# and https://github.com/SonarSource/mysql-migrator #\n" +
+ "#############################################################################################################\n";
+
+ Loggers.get(getClass()).warn(message);
}
}
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
+import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
public void init_logs_warning() throws SQLException {
underTest.init(newMetadata(5, 6));
- assertThat(logs.logs(LoggerLevel.WARN)).contains("MySQL support is deprecated and will be dropped soon.");
+ List<String> logs = this.logs.logs(LoggerLevel.WARN);
+ assertThat(logs.get(0).contains("End of Life of MySQL Support : SonarQube 7.8 is the last version that will support MySQL.")).isTrue();
}
@Test