-
Notifications
You must be signed in to change notification settings - Fork 697
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
Postgresql uniqueIndex error with sheme. #803
Comments
Any updates on this? also, why do we have to put the unique index there in the first place shouldn't exposed do it automatically when making a reference |
I think I am receiving a related error when using
results in:
Kotlin: 1.3.71
|
Further data point: it appears to occur when there is another schema with the same collection of tables and indices. |
SchemeUtils.setScheme doesn't reset current scheme in ExposedDatabaseMetadata
Should be fixed in the next release. Please report if issue will still exist. |
The error still exists in 0.28.1 when I try to create a table with a string id:
|
0.29.1 has the same error too. It is because Queries.kt line 307 val existingTableIndices = existingIndices[table].orEmpty().filterFKeys().filterInternalIndices() existingTableIndices contains Primary key as EntityIDColumnType instead of Primary index type. That's why in this line missingIndices.addAll(mappedIndices.subtract(existingTableIndices)) Primary key index is marked as missing. fun List<Index>.fixEntityIdColumns(): List<Index> {
return this.map {
val columns = it.columns.map { col ->
when (col.columnType.javaClass) {
EntityIDColumnType::class.java -> {
(col.columnType as EntityIDColumnType<*>).idColumn
}
else -> col
}
}
it.copy(columns = columns)
}
}
and val existingTableIndices = existingIndices[table].orEmpty().filterFKeys().filterInternalIndices().fixEntityIdColumns() |
this error still exists in version 0.37.3
when call
|
0.39.2 error still exists :(
when call
|
This is happening only with scheme.
Code:
Error:
The text was updated successfully, but these errors were encountered: