diff --git a/docs/content/advanced/backend/sales-channels/index.md b/docs/content/advanced/backend/sales-channels/index.md index 6101eaba79..69702035f9 100644 --- a/docs/content/advanced/backend/sales-channels/index.md +++ b/docs/content/advanced/backend/sales-channels/index.md @@ -2,17 +2,6 @@ In this document, you’ll 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. diff --git a/docs/content/advanced/backend/upgrade-guides/1-7-3.md b/docs/content/advanced/backend/upgrade-guides/1-7-3.md new file mode 100644 index 0000000000..cfa8118fc1 --- /dev/null +++ b/docs/content/advanced/backend/upgrade-guides/1-7-3.md @@ -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 they’re 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, it’s 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= +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 `` 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) diff --git a/www/docs/sidebars.js b/www/docs/sidebars.js index 9524ad6fa0..3aa88c4ea4 100644 --- a/www/docs/sidebars.js +++ b/www/docs/sidebars.js @@ -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",