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
{{ message }}
Repository navigation
bug: CapacitorSQLitePlugin.addUpgradeStatements() fails without error #621
Current behavior:
Calling addUpgradeStatement() with SQL statements containing obvious syntax errors silently fails.
Expected behavior:
I expect the function to error when executing the statements. Instead, I get errors after initialization at "runtime" when I query my tables that were not created because of invalid upgrade statements.
Steps to reproduce:
Change the upgrade statements in this demo to contain obvious errors.
Related code:
{
toVersion: 1,
statements: [`CREATE TABLE IF NOT EXISTS tires (id NOT_A_TYPE);`, `CREATE; T1asd`, ''],
}
As well as surfacing the errors from addUpgradeStatement, I would say createConnection should throw an exception if it is unable to satisfy the requested version argument (either because the opened db is too new or too old). When there is a mismatch the connection which is returned is not suitable for use.
Activity
cjhewett commentedon May 8, 2026
I just got bitten by this bug too.
As well as surfacing the errors from
addUpgradeStatement, I would saycreateConnectionshould throw an exception if it is unable to satisfy the requestedversionargument (either because the opened db is too new or too old). When there is a mismatch the connection which is returned is not suitable for use.