docs: added upgrade guide for 1.7.3 (#2968)

* docs: added upgrade guide for 1.7.3

* remove sales channel note
This commit is contained in:
Shahed Nasser
2023-01-11 17:36:29 +02:00
committed by GitHub
parent 21b1ae53e4
commit c94ce03aa2
3 changed files with 58 additions and 11 deletions

View File

@@ -2,17 +2,6 @@
In this document, youll learn about Sales Channels and how they can be used in Medusa.
:::note
The Sales Channels feature is currently in beta mode and guarded by a feature flag. To use Sales Channels either:
1. Enable the `MEDUSA_FF_SALES_CHANNELS` environment variable;
2. Or enable the `sales_channels` key in the Medusa server's settings.
You can learn more about enabling it in the [feature flags](../feature-flags/toggle.md) documentation.
:::
## Introduction
Sales Channels allow you to separate between the different channels you sell products in. For example, you can have a sales channel for your website and another for your mobile apps.

View File

@@ -0,0 +1,53 @@
---
description: 'Actions Required for v.1.7.3'
---
# v1.7.3
Version 1.7.3 of Medusa changes the feature flag value for Sales Channels and Publishable API Keys.
## Overview
Sales Channels and Publishable API Keys were introduced in previous versions of Medusa, but guarded by [feature flags](../feature-flags/toggle.md) This meant that developers had to manually enable them to use them.
Version 1.7.3 of Medusa keeps the feature flags for these two features, but theyre now enabled by default. This requires running the necessary migrations to ensure your server works as expected.
---
## Actions Required
### Run Migrations
After updating your Medusa server and before running it, run the following command to run the latest migration:
```bash
medusa migrations run
```
### Run Migration Script for Sales Channels
With the introduction of Sales Channels, products are now associated with them. To avoid inconsistencies with how products are linked to Sales Channels, its strongly recommended to run a migration script before running the Medusa server.
Start by adding the following environment variables:
```bash
TYPEORM_CONNECTION=postgres
TYPEORM_URL=<DATABASE_URL>
TYPEORM_LOGGING=true
TYPEORM_ENTITIES=./node_modules/@medusajs/medusa/dist/models/*.js
TYPEORM_MIGRATIONS=./node_modules/@medusajs/medusa/dist/migrations/*.js
```
Make sure to replace `<DATABASE_URL>` with the connection URL of your database.
Then, run the following command in the root of your Medusa server:
```bash
node ./node_modules/@medusajs/medusa/dist/scripts/sales-channels-migration.js
```
---
## Disabling Feature Flags
Although this version enables Sales Channels and Publishable API Keys by default, you can still turn them off using feature flags. Learn more in [this documentation](../feature-flags/toggle.md#disable-feature-flags)

View File

@@ -182,6 +182,11 @@ module.exports = {
id: 'advanced/backend/upgrade-guides/index'
},
items: [
{
type: "doc",
id: "advanced/backend/upgrade-guides/1-7-3",
label: "v1.7.3"
},
{
type: "doc",
id: "advanced/backend/upgrade-guides/1-7-1",