Were there any changes around the `verifySqlDeligh...
# squarelibraries
m
Were there any changes around the
verifySqlDelightMigration
task in the 1.5.0 release? After updating from 1.4.4 the task goes from passing to failing on a migration that reorders columns by renaming to a temp table, copying the rows, then dropping the temp table. The migration works fine when running on device but when running the verify task on 1.5.0+ I get the error
Copy code
Execution failed for task ':shared:verifyCommonMainDatabaseMigration'.
> A failure occurred while executing com.squareup.sqldelight.gradle.VerifyMigrationTask$VerifyMigrationAction
   > Could not retrieve foreign keys for table TableA: Table not found: 'TempTableB'
Here’s a small repo that recreates the issue https://github.com/mrf7/sqldelight-migration-verify
in the repo the verify migration task passes when using 1.4.4, but fails on 1.5.0. filling a database on device from the
pre-migration
branch then running the
main
branch handles the migration properly
a
My guess is that the version of sqlite used to verify migrations bumped and caused this error - you can manually force the version of the xerial sqlite dependency to confirm but I’ll try it myself later too
🙏 1
p
Apologies for resurrecting this, but did you have luck with forcing the version of xerial? I can get it to use
org.xerial:sqlite-jdbc:3.21.0.1
as a build dependency but the sqldelight plugin is still using
org.xerial:sqlite-jdbc:3.34.0
and the task is still failing.
For anyone else running into this, make sure your migrations follow the SQLite rules https://www.sqlite.org/lang_altertable.html#making_other_kinds_of_table_schema_changes May be sufficient to get past this issue, it worked for us