Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: CapacitorSQLitePlugin.addUpgradeStatements() fails without error #621

Open
efleetcon-simon-s opened this issue Jan 28, 2025 · 0 comments
Labels
bug/fix Something isn't working needs: triage

Comments

@efleetcon-simon-s
Copy link

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! 👌
@efleetcon-simon-s efleetcon-simon-s added bug/fix Something isn't working needs: triage labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix Something isn't working needs: triage
Projects
None yet
Development

No branches or pull requests

1 participant