From c2397536e9b5fc9defabcda896acc417c9484513 Mon Sep 17 00:00:00 2001 From: Jocelyne Date: Wed, 2 Oct 2024 14:22:38 +0200 Subject: [PATCH] chore!: Change Oracle and H2 Oracle ubyteType from NUMBER(4) to NUMBER(3) to not take up more space than needed as UByte has a maximum of three digits --- documentation-website/Writerside/topics/Breaking-Changes.md | 1 + .../kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation-website/Writerside/topics/Breaking-Changes.md b/documentation-website/Writerside/topics/Breaking-Changes.md index 8845661361..5f8088b052 100644 --- a/documentation-website/Writerside/topics/Breaking-Changes.md +++ b/documentation-website/Writerside/topics/Breaking-Changes.md @@ -3,6 +3,7 @@ ## 0.56.0 * If the `distinct` parameter of `groupConcat()` is set to `true`, when using Oracle or SQL Server, this will now fail early with an `UnsupportedByDialectException`. Previously, the setting would be ignored and SQL function generation would not include a `DISTINCT` clause. +* In Oracle and H2 Oracle, the `ubyte()` column now maps to data type `NUMBER(3)` instead of `NUMBER(4)`. ## 0.55.0 * The `DeleteStatement` property `table` is now deprecated in favor of `targetsSet`, which holds a `ColumnSet` that may be a `Table` or `Join`. diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt index 551ecf8698..ed33a99f38 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt @@ -18,7 +18,7 @@ internal object OracleDataTypeProvider : DataTypeProvider() { } else { "NUMBER(3)" } - override fun ubyteType(): String = "NUMBER(4)" + override fun ubyteType(): String = "NUMBER(3)" override fun shortType(): String = if (currentDialect.h2Mode == H2Dialect.H2CompatibilityMode.Oracle) { "SMALLINT" } else {