-
Notifications
You must be signed in to change notification settings - Fork 516
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 migrations using rename column cause compilation error e.g ALTER TABLE X RENAME COLUMN y TO Z #4879
Comments
🚬 🤔 Sqlite has similar issues but needs it's own issue #4897 and PR as fixes are slightly different |
Could you elaborate on the work around for this? I couldn't manage to make it work |
🤔 @0xEDU - If I remember - this issue was one of several problems running migrations that I created PRs. |
SQLDelight Version
2.0.*
Operating System
Any
Gradle Version
Any
Kotlin Version
Any
Dialect
Postgresql
AGP Version
No response
Describe the Bug
When using migration files (sqm) the rename column causes compilation error - happens in 2.0.0 and 2.0.1
ALTER TABLE Address RENAME COLUMN address TO address_1;
Work-around - rename query files first as the problem appears to be the error annotations erroring with a class cast exception
either ColumnDefMixin or SqlColumnName
Stacktrace
Postgresql Cause: class app.cash.sqldelight.dialects.postgresql.grammar.psi.impl.PostgreSqlAlterTableRenameColumnImpl cannot be cast to class com.alecstrong.sql.psi.core.psi.mixins.ColumnDefMixin (app.cash.sqldelight.dialects.postgresql.grammar.psi.impl.PostgreSqlAlterTableRenameColumnImpl and com.alecstrong.sql.psi.core.psi.mixins.ColumnDefMixin are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @22a8bdc3)
Gradle Build Script
The text was updated successfully, but these errors were encountered: