diff --git a/docusaurus/docs/dev-docs/migration/v4-to-v5/breaking-changes.md b/docusaurus/docs/dev-docs/migration/v4-to-v5/breaking-changes.md index 134b7b8f8d..9a59b23174 100644 --- a/docusaurus/docs/dev-docs/migration/v4-to-v5/breaking-changes.md +++ b/docusaurus/docs/dev-docs/migration/v4-to-v5/breaking-changes.md @@ -45,6 +45,7 @@ The beta version of Strapi 5 is not meant to be used in production yet. - [MySQL v5 is not supported anymore](/dev-docs/migration/v4-to-v5/breaking-changes/mysql5-unsupported) - [Database identifiers can't be longer than 55 characters](/dev-docs/migration/v4-to-v5/breaking-changes/database-identifiers-shortened) +- [Only the `better-sqlite3` package is supported for the sqlite client](/dev-docs/migration/v4-to-v5/breaking-changes/only-better-sqlite3-for-sqlite) ## Plugins, plugins configuration, and plugins development diff --git a/docusaurus/docs/dev-docs/migration/v4-to-v5/breaking-changes/only-better-sqlite3-for-sqlite.md b/docusaurus/docs/dev-docs/migration/v4-to-v5/breaking-changes/only-better-sqlite3-for-sqlite.md new file mode 100644 index 0000000000..5106f1e50d --- /dev/null +++ b/docusaurus/docs/dev-docs/migration/v4-to-v5/breaking-changes/only-better-sqlite3-for-sqlite.md @@ -0,0 +1,60 @@ +--- +title: Only the `better-sqlite3` package is supported for the sqlite client +description: In Strapi 5, +sidebar_label: Only better-sqlite3 for sqlite +displayed_sidebar: devDocsMigrationV5Sidebar +unlisted: true +tags: + - breaking changes +--- + +import Intro from '/docs/snippets/breaking-change-page-intro.md' +import MigrationIntro from '/docs/snippets/breaking-change-page-migration-intro.md' +import NoPlugins from '/docs/snippets/breaking-change-not-affecting-plugins.md' + +# 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`. + + + + + +## 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 + + + +### Notes + +Strapi 5 uses the `better-sqlite3` package for SQLite databases under the hood. Knex rewrites the `sqlite` option as `better-sqlite3`. + +### Manual procedure + +No manual migration should be required as codemods from the [upgrade tool](/dev-docs/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. diff --git a/docusaurus/sidebars.js b/docusaurus/sidebars.js index 3db12cf818..ad505d31ef 100644 --- a/docusaurus/sidebars.js +++ b/docusaurus/sidebars.js @@ -1152,7 +1152,8 @@ const sidebars = { }, items: [ 'dev-docs/migration/v4-to-v5/breaking-changes/mysql5-unsupported', - 'dev-docs/migration/v4-to-v5/breaking-changes/database-identifiers-shortened' + 'dev-docs/migration/v4-to-v5/breaking-changes/database-identifiers-shortened', + 'dev-docs/migration/v4-to-v5/breaking-changes/only-better-sqlite3-for-sqlite', ] }, {