Skip to content

feat(sqlite): switch to @libsql/client, add migration journal generation#4

Merged
youssef-saber-3 merged 2 commits into
AINATIVEM-44from
AINATIVEM-43-sqlite-fix
May 11, 2026
Merged

feat(sqlite): switch to @libsql/client, add migration journal generation#4
youssef-saber-3 merged 2 commits into
AINATIVEM-44from
AINATIVEM-43-sqlite-fix

Conversation

@dmitriyeff
Copy link
Copy Markdown
Contributor

Summary

  • Replaces better-sqlite3 (requires native C compilation, fails on Node v24) with @libsql/client (ships prebuilt WASM — no compilation needed)
  • Adds generateMigrationJournal to emit src/database/migrations/meta/_journal.json with the correct Drizzle dialect per database, so drizzle-kit can validate and apply migrations without error
  • SQLite runMigrations is now properly awaited (libsql migrator is async)
  • SQLite default DB URL updated to file:./data.db (libsql URL format)
  • Tests updated to assert @libsql/client / drizzle-orm/libsql and new journal file content

Test plan

  • npm test — 87/87 pass
  • Merge conflict with AINATIVEM-44 (generateDockerCompose vs generateMigrationJournal) resolved — both functions kept

@youssef-saber-3 youssef-saber-3 merged commit 8e8aafa into AINATIVEM-44 May 11, 2026
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