-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using PrimaryKey fails with h2.Database #1051
Comments
Please consider updating to h2 1.4.197 and check the issue again. |
Hey! |
It fixed in master, will be released soon (this week I guess). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Duplicate of #841
To reproduce check out https://github.com/Rotzlucky/ExposedH2Example
uses:
kotlin_version=1.3.72 ktor_version=1.1.3 exposed_version=0.27.1 h2_version=1.4.197
When running the application you get the error message:
org.jetbrains.exposed.exceptions.ExposedSQLException: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "ALTER TABLE USERS ALTER COLUMN ID VARCHAR(190) PRIMARY[*] KEY"; SQL statement: ALTER TABLE USERS ALTER COLUMN ID VARCHAR(190) PRIMARY KEY [42000-197]
Error goes away after removing the primaryKey statement from User.kt
Exception doesn't occur when connecting to mysql or sqlite
In an older project, still on exposed 0.13.5 (which brings its own dependency of h2(1.4.197)), the exception doesn't occur either.
The text was updated successfully, but these errors were encountered: