]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-23279 fixed an issue where the mapping for the jdbc column type was missing...
authorlukasz-jarocki-sonarsource <lukasz.jarocki@sonarsource.com>
Thu, 3 Oct 2024 14:49:58 +0000 (16:49 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 4 Oct 2024 20:03:46 +0000 (20:03 +0000)
server/sonar-db-core/src/testFixtures/java/org/sonar/db/AbstractDbTester.java

index e728f3ca7ff18f0e2cb3040290a5220e904131b1..783c296128b31c2d7f0e6fa95c632cfe7c5351ae 100644 (file)
@@ -63,6 +63,7 @@ import static com.google.common.collect.Lists.asList;
 import static java.sql.Types.BIGINT;
 import static java.sql.Types.BIT;
 import static java.sql.Types.BOOLEAN;
+import static java.sql.Types.DECIMAL;
 import static java.sql.Types.DOUBLE;
 import static java.sql.Types.INTEGER;
 import static java.sql.Types.NUMERIC;
@@ -76,10 +77,12 @@ public class AbstractDbTester<T extends TestDb> extends ExternalResource {
 
   private static final Pattern INDEX_NAME_PATTERN = Pattern.compile("COALESCE\\(([\\w_]*),");
 
-  private static final Map<Integer, Integer> POSTGRES_TYPE_SUBSTITUTION = Map.of(BOOLEAN, BIT);
+  private static final Map<Integer, Integer> POSTGRES_TYPE_SUBSTITUTION = Map.of(BOOLEAN, BIT,
+    DOUBLE, NUMERIC);
   private static final Map<Integer, Integer> MSSQL_TYPE_SUBSTITUTION = Map.of(
     BOOLEAN, BIT,
-    VARCHAR, NVARCHAR);
+    VARCHAR, NVARCHAR,
+    DOUBLE, DECIMAL);
 
   private static final Map<Integer, Integer> ORACLE_TYPE_SUBSTITUTION = Map.of(
     BOOLEAN, NUMERIC,