Skip to content

(Feat) Initialise table properly even if db file is corrupted. - #654

Merged
Jason Johnston (jasonjoh) merged 1 commit into
microsoftgraph:mainfrom
matthew-lim-matthew-lim:matthewlim/fix-table-creation
Nov 13, 2025
Merged

(Feat) Initialise table properly even if db file is corrupted.#654
Jason Johnston (jasonjoh) merged 1 commit into
microsoftgraph:mainfrom
matthew-lim-matthew-lim:matthewlim/fix-table-creation

Conversation

@matthew-lim-matthew-lim

Copy link
Copy Markdown
Contributor

If the table sql table isn't created properly, then the program will fail because ensureDatabase() will think that the table already exists because the database already exists.

This is highly prone to failure, because when the authentication isn't completed successfully, it can create a database that doesn't have a table.

The improvement is to use a CREATE TABLE IF NOT EXISTS sql statement so that the table can be created, even if the database exists without a sql table.

@jasonjoh

Copy link
Copy Markdown
Member

@jasonjoh
Jason Johnston (jasonjoh) merged commit 054df8b into microsoftgraph:main Nov 13, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants