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:
Shahed Nasser
2023-06-01 14:23:45 +03:00
committed by GitHub
parent 274056a38d
commit c22b4ace0c
16 changed files with 46 additions and 151 deletions

View File

@@ -113,7 +113,7 @@ You can find the format of the PostgreSQL database URL in [PostgreSQLs docume
:::
Then, in `medusa-config.js` in the exported object, comment out or remove the SQLite database configurations and add the PostgreSQL database configurations:
Then, in `medusa-config.js` in the exported object, add the PostgreSQL database configurations:
```jsx title=medusa-config.js
module.exports = {
@@ -121,9 +121,6 @@ module.exports = {
// ...
database_url: DATABASE_URL,
database_type: "postgres",
// REMOVE OR COMMENT OUT THE BELOW:
// database_database: "./medusa-db.sql",
// database_type: "sqlite",
},
}
```

View File

@@ -86,32 +86,35 @@ You can use the Strapi plugin on an existing Medusa backend, however, existing d
To create your Medusa backend, run the following command:
```bash
medusa new medusa-backend --seed
medusa new medusa-backend
```
The `--seed` flag creates an SQLite database and seeds it with some demo data.
### Configure your Backend
Once the command is done executing, change to the newly created `medusa-backend` directory. Then, in `medusa-config.js`, change the exported object at the end of the file to enable Redis:
Once the command is done executing, change to the newly created `medusa-backend` directory:
```jsx title=medusa-config.js
module.exports = {
projectConfig: {
redis_url: REDIS_URL,
// ...
},
// ...
}
```bash
cd medusa-backend
```
This uses the default Redis configurations. If you want to learn more about configuring Redis, [check out this documentation](../../development/backend/configurations.md#redis).
You must then configure your backend to:
:::tip
- Connect to a PostgreSQL database, as explained [here](../../development/backend/configurations.md#database-configuration)
- Install and configure an event-bus module, as explained [here](../../development/backend/configurations.md#recommended-event-bus-modules)
It is also recommended to use PostgreSQL for an optimal experience, however, it is not required. Learn how to [install](../../development/backend/prepare-environment.mdx#postgres) and [configure](../../development/backend/configurations.md#postgresql-configurations) it on your Medusa backend.
### Run Migrations
:::
After configuring the connection to the database, you must run migrations to add the necessary database schema definitions in your database. To do that, run the following command in the `medusa-backend` directory:
```bash
medusa migrations run
```
You can optionally seed your database with demo data by running the `seed` command:
```bash
medusa seed --seed-file=data/seed.json
```
---