跳到主要内容

Only the better-sqlite3 package is supported for the SQLite client

Strapi 5 can only use the better-sqlite3 package for SQLite databases, and the client value for it must be set to sqlite.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?No
🤖 Is this breaking change automatically handled by a codemod?Yes

Breaking change description

In Strapi v4

The database configuration client option for SQLite databases accepts several values such as sqlite3, vscode/sqlite3, sqlite-legacy, and better-sqlite3.

In Strapi 5

The database configuration client option for SQLite database only accepts sqlite.

Migration

This section regroups useful notes and procedures about the introduced breaking change.

Notes

  • Strapi 5 uses the better-sqlite3 package for SQLite databases under the hood and rewrites the sqlite option as better-sqlite3 for Knex.
  • Additional information about database clients and configuration can be found in the database configuration documentation.

Manual procedure

No manual migration should be required as codemods from the upgrade tool will handle this change.

In case you want to manually migrate, run the following commands in the terminal:

  1. Run yarn remove sqlite3 to remove the sqlite 3 package.
  2. Run yarn add better-sqlite3 to install the better-sqlite3 package.