Skip to content

Commit 9c3c8cb

Browse files
committed
added upgrade guide for v1.3.6
1 parent fb1105b commit 9c3c8cb

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# v1.3.6
2+
3+
Following the addition of feature flags in version v1.3.3 and the addition of the Sales Channels API in v1.3.5, v1.3.6 introduces a data migration script that moves all products into the Default Sales Channel.
4+
5+
:::note
6+
7+
In version 1.3.6, Sales Channels are available but hidden behind feature flags. If you don’t have Sales Channels enabled, you don’t need to follow the steps detailed in this migration script.
8+
9+
:::
10+
11+
## Prerequisites
12+
13+
Before performing the actions mentioned in this guide, you must set the following environment variables:
14+
15+
```bash
16+
TYPEORM_CONNECTION=postgres
17+
TYPEORM_URL=<DATABASE_URL>
18+
TYPEORM_LOGGING=true
19+
TYPEORM_ENTITIES=./node_modules/@medusajs/medusa/dist/models/*.js
20+
TYPEORM_MIGRATIONS=./node_modules/@medusajs/medusa/dist/migrations/*.js
21+
```
22+
23+
These environment variables are used in the data migration scripts in this upgrade. Make sure to replace `<DATABASE_URL>` with your PostgreSQL database URL.
24+
25+
## Sales Channels
26+
27+
Sales Channels were introduced in v1.3.5 behind a feature flag. By enabling Sales Channels, developers and users can associate products and other entities with a specific Sales Channel.
28+
29+
However, if you upgraded Medusa to v1.3.5 and enabled Sales Channels, you must add every product to at least one Sales Channel manually. Otherwise, products can’t be added to carts in different Sales Channels.
30+
31+
v1.3.6 introduces a data migration script that automates this process for you by moving all your products into a default Sales Channel. This ensures that you can use the Sales Channels feature without it affecting the user experience in your store.
32+
33+
### Actions Required
34+
35+
If you’ve enabled Sales Channels, it’s essential to run the data migration script after upgrading your server and before starting your Medusa server:
36+
37+
```bash
38+
node ./node_modules/@medusajs/medusa/dist/scripts/sales-channels-migration.js
39+
```

www/docs/sidebars.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ module.exports = {
291291
id: "advanced/backend/upgrade-guides/1-3-0",
292292
label: "v1.3.0"
293293
},
294+
{
295+
type: "doc",
296+
id: "advanced/backend/upgrade-guides/1-3-6",
297+
label: "v1.3.6"
298+
},
294299
]
295300
},
296301
]

0 commit comments

Comments
 (0)