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

Update bettersqlite3 #250

Merged
merged 12 commits into from
Jul 27, 2024
Merged

Update bettersqlite3 #250

merged 12 commits into from
Jul 27, 2024

Conversation

eliandoran
Copy link
Contributor

Caution

The update of better-sqlite3 from 8.5.0 to 11.1.2 will cause complete incompatibility of the database with prior versions of Trilium Notes.
More specifically:

/home/elian/Projects/Trilium Dev/trilium/node_modules/better-sqlite3/lib/methods/pragma.js:10
        const stmt = this[cppdb].prepare(`PRAGMA ${source}`, this, true);
                                 ^
SqliteError: malformed database schema (sqlite_stat1) - invalid rootpage
    at Database.pragma (/home/elian/Projects/Trilium Dev/trilium/node_modules/better-sqlite3/lib/> methods/pragma.js:10:27)
    at Object.<anonymous> (/home/elian/Projects/Trilium Dev/trilium/src/services/sql.js:14:14)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/home/elian/Projects/Trilium Dev/trilium/src/services/notes.js:1:13)
    at Module._compile (node:internal/modules/cjs/loader:1364:14) {
  code: 'SQLITE_CORRUPT'
}
  • Updates better-sqlite3 from 8.5.0 to 11.1.2
  • Adds a script to download prebuilt binaries for better-sqlite3 from its releases page.

@eliandoran eliandoran changed the base branch from feature/update_to_node20 to feature/update_electron July 20, 2024 12:16
@eliandoran eliandoran added this to the v0.90.2-beta milestone Jul 21, 2024
@eliandoran eliandoran modified the milestones: v0.90.2-beta, v0.90.1-beta Jul 24, 2024
Base automatically changed from feature/update_electron to develop July 27, 2024 12:20
@eliandoran eliandoran merged commit f382d3c into develop Jul 27, 2024
7 checks passed
@eliandoran eliandoran deleted the feature/update_bettersqlite3 branch July 27, 2024 12:20
@eliandoran eliandoran restored the feature/update_bettersqlite3 branch December 14, 2024 06:56
@eliandoran eliandoran deleted the feature/update_bettersqlite3 branch December 14, 2024 06:57
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.

1 participant