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.
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 thesqlite
option asbetter-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:
- Run
yarn remove sqlite3
to remove the sqlite 3 package. - Run
yarn add better-sqlite3
to install thebetter-sqlite3
package.