Plugin version:
6.0.2
Platform(s):
Web
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`, ''],
}
Capacitor doctor:
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 7.0.1
@capacitor/core: 7.0.1
@capacitor/android: 7.0.1
@capacitor/ios: 7.0.1
Installed Dependencies:
@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0
[success] iOS looking great! 👌
[success] Android looking great! 👌
Plugin version:
6.0.2
Platform(s):
Web
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:
Capacitor doctor: