From 769e240b7b28cf02af20a60abdad189a1db4165a Mon Sep 17 00:00:00 2001 From: Jocelyne Date: Wed, 2 Oct 2024 14:22:49 +0200 Subject: [PATCH] chore!: Change Oracle and H2 Oracle ushortType from NUMBER(6) to NUMBER(5) to not take up more space than needed as UShort has a maximum of five 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 5f8088b052..cd7b1738b2 100644 --- a/documentation-website/Writerside/topics/Breaking-Changes.md +++ b/documentation-website/Writerside/topics/Breaking-Changes.md @@ -4,6 +4,7 @@ * 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)`. +* In Oracle and H2 Oracle, the `ushort()` column now maps to data type `NUMBER(5)` instead of `NUMBER(6)`. ## 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 ed33a99f38..9bcca0262d 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 @@ -24,7 +24,7 @@ internal object OracleDataTypeProvider : DataTypeProvider() { } else { "NUMBER(5)" } - override fun ushortType(): String = "NUMBER(6)" + override fun ushortType(): String = "NUMBER(5)" override fun integerType(): String = "NUMBER(12)" override fun integerAutoincType(): String = "NUMBER(12)" override fun uintegerType(): String = "NUMBER(13)"