-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(medusa): Remove sqlite support #4026
Conversation
🦋 Changeset detectedLatest commit: a354cde The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
We will also need to remove all mention of sqlite in our documentation cc @shahednasser |
…sa into feat/remove-sqlite-support
await dataSource.initialize() | ||
} catch (err) { | ||
// database name does not exist | ||
if (err.code === "3D000") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Should we always throw an error to prevent swallowing it?
try { | ||
await dataSource.query(`select * from migrations`) | ||
} catch (err) { | ||
if (err.code === "42P01") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment: Another one to reduce friction and make it easier to get started
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as the previous one
f5b0173
to
536db08
Compare
Yeah and there is no MySql//MariaDB support MAKING US USE 20 MB OF RAM FOR EVERY CONNECTION WE NEED TO MAKE! |
/snapshot-this |
@adrien2p will you give this is a review when time allows for it? |
🚀 A snapshot release has been made for this PRTest the snapshots by updating your yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add [email protected] yarn add [email protected] yarn add [email protected] yarn add [email protected] yarn add [email protected] yarn add [email protected] yarn add [email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected] yarn add @medusajs/[email protected]
|
@olivermrbl YOU are ignoring my comment! It is a democratic opens source and here is open source opinion: sqlite support is a GOOD AND BVERY GOOD FEAT DO NOT REMOVE IT! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just have a question and a nit suggestion 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Should we also remove sqlite and better-sqlite from the main package.json?
From where? I believe they are removed already |
As you can read from the PR description, we've concluded that SQLite is causing more harm than good and will therefore be removed. It is virtually unusable even for the simplest cases, and we don't want to put in the effort to support it fully. We will soon be moving to a more ORM agnostic approach at which point, you'll be able to build support for it yourself. Find a related comment here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm about the package question, i might've looked at an outdated file.
Thanks for moving the categories seed in the process! <3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments
await dataSource.initialize() | ||
} catch (err) { | ||
// database name does not exist | ||
if (err.code === "3D000") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Should we always throw an error to prevent swallowing it?
try { | ||
await dataSource.query(`select * from migrations`) | ||
} catch (err) { | ||
if (err.code === "42P01") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as the previous one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments
What
Remove support for SQLite
Why
SQLite support was initially added to reduce friction for developers looking to try out Medusa. It runs on most operating systems without any installation, which means you'll be able to create and start a Medusa starter without configuration.
Though, as we've added features that use more advanced database concepts, we've seen that SQLite is now causing more harm than good. It still allows developers to get a server up and running very quickly, but as soon as you start playing around with our admin system or the storefront starter, you'll experience issues caused by the limitations of SQLite. The issues are primarily centered around transaction management. A concept used extensively in our core and poorly supported by SQLite.
We've concluded that these issues are causing too many headaches for our users and require too much assistance from our side for it to be worth it. Therefore, we are removing SQLite from our core and will only support Postgres for the time being.