JetBrains / Exposed

Kotlin SQL Framework
http://jetbrains.github.io/Exposed/
Apache License 2.0
8.1k stars 677 forks source link

fix: EXPOSED-272 [MySQL, Oracle] Unsupported type BIGINT UNSIGNED for auto-increment #1982

Closed bog-walk closed 5 months ago

bog-walk commented 5 months ago

With both Oracle and MySQL, attempting to create a table with an unsigned integer or long column that should auto-increment throws an Unsupported type exception.

This occurs because AutoIncColumnType, which delegates to the underlying type, is currently set up to only detect signed integer and long column types.

It is not possible to reuse the existing integerAutoincType() or longAutoincType() if the delegate is an unsigned column because of the type syntax differences between standard and auto-incrementing columns in some databases. So new types have been added to DataTypeProvider.