Skip to content

Error when setting up db: https://stackoverflow.com/questions/75621212/capacitor-community-sqlite-error-query-failed-selectsql-queryall-no-such-t #384

Closed Answered by jepiqueau
folsze asked this question in Q&A
Discussion options

You must be logged in to vote

@folsze The error comes from a wrong upgrade-statements it should be:

export const mapModeLocationVersionUpgrades = [
  {
    toVersion: 1,
    statements: [
      `CREATE TABLE IF NOT EXISTS map (
          id integer PRIMARY KEY AUTOINCREMENT NOT NULL
        );`,
      `CREATE TABLE IF NOT EXISTS mode (
          id integer PRIMARY KEY AUTOINCREMENT NOT NULL,
          mapId integer,
          FOREIGN KEY (mapId) REFERENCES map (id)
        );`,
    ]
  },
]

this make the app working till it reach another bug.
Hope this will help you to start.

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@folsze
Comment options

@folsze
Comment options

Comment options

You must be logged in to vote
1 reply
@folsze
Comment options

Comment options

You must be logged in to vote
3 replies
@folsze
Comment options

@folsze
Comment options

@folsze
Comment options

Comment options

You must be logged in to vote
1 reply
@folsze
Comment options

Answer selected by jepiqueau
Comment options

You must be logged in to vote
1 reply
@folsze
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants