David Carr03/21/2023, 10:32 PM
If the driver supports it, migrations are run in a transaction. You should not surround your migrations inWe have hundreds of migrations in our app that start with, as this can cause a crash with some drivers.
and end with
that have worked fine. Recently, we encountered an upgrade that triggered a
exception, and removing this fixed it. Do all migrations on Android already run in a transaction? Was looking at the driver code, and couldn't see where that is done. Is this advice accurate? Should we remove
android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY)
from our existing migration files to be safe, and continue avoiding it going forward?