vscode-sqlite icon indicating copy to clipboard operation
vscode-sqlite copied to clipboard

Sqlite3 strict table syntax error

Open tianjianchn opened this issue 2 years ago • 2 comments

When trying to open an database file with strict table enabled, it said

Failed to open database '/path/to/db.sqlite3': malformed database schema (metadata) - near "strict": syntax error

For strict table, see https://www.sqlite.org/stricttables.html

tianjianchn avatar Oct 08 '22 12:10 tianjianchn

I've also encountered this issue when trying to open an SQLite database created with cr-sqlite extension which uses STRICT modifier for its internal table.

[vscode-sqlite][ERROR] Failed to open database '.\data\todo.db': malformed database schema (crsql_tracked_peers) - near "STRICT": syntax error

Azarattum avatar Jan 10 '23 14:01 Azarattum

Looks like the problem is that vscode-sqlite is linked against an old version of SQLite.

Strict mode was introduced in version 3.37 where this extension is using 3.26 (https://github.com/AlexCovizzi/vscode-sqlite/tree/master/bin). Current version is 3.40.1

tantaman avatar Jan 10 '23 14:01 tantaman