You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wondering if anyone can add some color to the advice in the SQLDelight docs that states
If the driver supports it, migrations are run in a transaction. You should not surround your migrations in BEGIN/END TRANSACTION, as this can cause a crash with some drivers.
We have hundreds of migrations in our app that start with BEGIN TRANSACTION and end with COMMIT that have worked fine. Recently, we encountered an upgrade that triggered a android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY[5]) exception, and removing this fixed it.
Do all migrations on Android already run in a transaction? I couldn't see where that is done in the driver code. Is this advice accurate? Is it advisable to remove BEGIN TRANSACTION from our existing migration files, and continue avoiding it going forward?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Wondering if anyone can add some color to the advice in the SQLDelight docs that states
We have hundreds of migrations in our app that start with
BEGIN TRANSACTION
and end withCOMMIT
that have worked fine. Recently, we encountered an upgrade that triggered aandroid.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY[5])
exception, and removing this fixed it.Do all migrations on Android already run in a transaction? I couldn't see where that is done in the driver code. Is this advice accurate? Is it advisable to remove
BEGIN TRANSACTION
from our existing migration files, and continue avoiding it going forward?Beta Was this translation helpful? Give feedback.
All reactions