docs: remove mentions of SQLite (#4045)
* docs: removed mentions of sqlite * removed mentions of the seed option * remove sidebar link * Made PostgreSQL a required tool * fixed heading
This commit is contained in:
@@ -22,29 +22,7 @@ Some of the configurations mentioned in this document are already defined in `me
|
||||
|
||||
## Database Configuration
|
||||
|
||||
Medusa supports two database types: SQLite and PostgreSQL.
|
||||
|
||||
:::tip
|
||||
|
||||
You can use SQLite for development purposes, however, it’s recommended to use PostgreSQL.
|
||||
|
||||
:::
|
||||
|
||||
### SQLite Configurations
|
||||
|
||||
For SQLite you mainly need two configurations:
|
||||
|
||||
```jsx
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
// ...other configurations
|
||||
database_type: "sqlite",
|
||||
database_database: "./medusa-db.sql",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Where `database_type` is `sqlite` and `database_database` is the location you want the SQLite database to be created in.
|
||||
Medusa only supports using a PostgreSQL database.
|
||||
|
||||
### PostgreSQL Configurations
|
||||
|
||||
@@ -54,9 +32,9 @@ Before getting started with configuring PostgreSQL, you should have created a Po
|
||||
|
||||
:::
|
||||
|
||||
For PostgreSQL you mainly need two configurations:
|
||||
The following configurations are required for PostgreSQL
|
||||
|
||||
```jsx
|
||||
```js
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
// ...other configurations
|
||||
@@ -86,9 +64,9 @@ postgres://localhost/store?options=-c search_path=test
|
||||
|
||||
Where `test` is the name of the database schema that should be used instead of `public`.
|
||||
|
||||
### Changing Database Type
|
||||
### Changing or Setting Database
|
||||
|
||||
Remember to run migrations after you change your database type to `postgres` from another type:
|
||||
Remember to run migrations after you change or set your database:
|
||||
|
||||
```bash
|
||||
npx @medusajs/medusa-cli migrations run
|
||||
@@ -103,7 +81,7 @@ As Medusa internally uses [Typeorm](https://typeorm.io/) to connect to the datab
|
||||
|
||||
These configurations are not required and can be omitted.
|
||||
|
||||
```jsx
|
||||
```js
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
// ...other configurations
|
||||
|
||||
@@ -40,7 +40,7 @@ If you run into any errors while installing the CLI tool, check out the [trouble
|
||||
### 2. Create a new Medusa project
|
||||
|
||||
```bash noReport
|
||||
medusa new my-medusa-store --seed
|
||||
medusa new my-medusa-store
|
||||
```
|
||||
|
||||
You'll then be asked to specify your PostgreSQL database credentials. You can choose "Continue" to use the default credentials shown in the terminal, choose "Change credentials" to specify your PostgreSQL credentails, or choose "Skip database setup" to create the database later.
|
||||
@@ -65,6 +65,14 @@ If you run into any errors while installing the CLI tool, check out the [trouble
|
||||
negativeQuestion="Please describe the issue you faced."
|
||||
/>
|
||||
|
||||
### Seed Data
|
||||
|
||||
For better testing, you can add demo data to your Medusa backend by running the seed command in your Medusa backend directory:
|
||||
|
||||
```bash
|
||||
medusa seed --seed-file=data/seed.json
|
||||
```
|
||||
|
||||
### Test the Backend
|
||||
|
||||
After these three steps and in only a couple of minutes, you now have a complete commerce engine running locally. You can test it out by sending a request using a tool like Postman or through the command line:
|
||||
|
||||
@@ -142,21 +142,9 @@ If you run into any errors while installing the CLI tool, check out the [trouble
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Install Medusa Backend
|
||||
|
||||
If you're not interested in installing the optional tools and want to get started with Medusa quickly, check out the [Medusa Backend Quickstart](./install.mdx).
|
||||
|
||||
---
|
||||
|
||||
## Optional Tools
|
||||
|
||||
These tools are not required to have to run a Medusa backend, but it's highly recommended that you have them installed.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
Although you can use an SQLite database with Medusa which would require no necessary database installations, it is recommended to use a PostgreSQL database for your backend.
|
||||
The Medusa backend uses PostgreSQL to store data of your commerce system.
|
||||
|
||||
:::tip
|
||||
|
||||
@@ -195,6 +183,10 @@ You can download PostgreSQL on your macOS using [the installer on their website]
|
||||
|
||||
---
|
||||
|
||||
## Install Medusa Backend
|
||||
|
||||
If you're not interested in installing the optional tools and want to get started with Medusa quickly, check out the [Medusa Backend Quickstart](./install.mdx).
|
||||
|
||||
## See Also
|
||||
|
||||
- [Install Medusa backend](./install.mdx)
|
||||
|
||||
@@ -30,10 +30,6 @@ This documentation helps you learn how to create a batch job strategy. The batch
|
||||
|
||||
It is assumed that you already have a Medusa backend installed and set up. If not, you can follow our [quickstart guide](../backend/install.mdx) to get started. The Medusa backend must also have an event bus module installed, which is available when using the default Medusa backend starter.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
If you use SQLite during your development, it’s highly recommended that you use PostgreSQL when working with batch jobs. Learn how to [install PostgreSQL](../backend/prepare-environment.mdx#postgresql) and [configure it with your Medusa backend](../backend/configurations.md#postgresql-configurations).
|
||||
|
||||
---
|
||||
|
||||
## 1. Create a File
|
||||
|
||||
@@ -21,10 +21,6 @@ Although this documentation specifically targets import strategies, you can use
|
||||
|
||||
It's assumed that you already have a Medusa backend installed and set up. If not, you can follow our [quickstart guide](../backend/install.mdx) to get started. The Medusa backend must also have an event bus module installed, which is available when using the default Medusa backend starter.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
If you use SQLite during your development, it’s highly recommended that you use PostgreSQL when working with batch jobs. Learn how to [install PostgreSQL](../backend/prepare-environment.mdx#postgresql) and [configure it with your Medusa backend](../backend/configurations.md#postgresql-configurations).
|
||||
|
||||
---
|
||||
|
||||
## Override Batch Job Strategy
|
||||
|
||||
@@ -9,12 +9,6 @@ import Icons from '@theme/Icon';
|
||||
|
||||
In this document, you'll learn what Migrations are in Medusa.
|
||||
|
||||
:::note
|
||||
|
||||
Medusa’s Migrations do not work with SQLite databases. They are intended to be used with PostgreSQL databases, which is the recommended database for using Medusa in production.
|
||||
|
||||
:::
|
||||
|
||||
## What are Migrations
|
||||
|
||||
Migrations are scripts that are used to make additions or changes to your database schema. In Medusa, they are essential for both when you first install your backend and for subsequent backend upgrades later on.
|
||||
|
||||
Reference in New Issue
Block a user