- Notifications
You must be signed in to change notification settings - Fork 1.2k
Document better-sqlite3 breaking change #2083
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits Select commit Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions 60 .../dev-docs/migration/v4-to-v5/breaking-changes/only-better-sqlite3-for-sqlite.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -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` | ||||||
| | ||||||
| <Intro /> | ||||||
| | ||||||
| <NoPlugins/> | ||||||
| | ||||||
| ## Breaking change description | ||||||
| | ||||||
| <SideBySideContainer> | ||||||
| | ||||||
| <SideBySideColumn> | ||||||
| | ||||||
| **In Strapi v4** | ||||||
| | ||||||
| The database configuration `client` option for SQLite databases accepts several values such as `sqlite3`, `vscode/sqlite3`, `sqlite-legacy`, and `better-sqlite3`. | ||||||
| | ||||||
| </SideBySideColumn> | ||||||
| | ||||||
| <SideBySideColumn> | ||||||
| | ||||||
| **In Strapi 5** | ||||||
| | ||||||
| The database configuration `client` option for SQLite database only accepts `sqlite`. | ||||||
| | ||||||
| </SideBySideColumn> | ||||||
| | ||||||
| </SideBySideContainer> | ||||||
| | ||||||
| ## Migration | ||||||
| | ||||||
| <MigrationIntro /> | ||||||
| | ||||||
| ### Notes | ||||||
| | ||||||
| Strapi 5 uses the `better-sqlite3` package for SQLite databases under the hood. Knex rewrites the `sqlite` option as `better-sqlite3`. | ||||||
| Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggested change
| ||||||
| | ||||||
| ### 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. | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.