docs: added upgrade guide for v1.7.6 (#3207)

This commit is contained in:
Shahed Nasser
2023-02-08 20:51:47 +02:00
committed by GitHub
parent 3b474ec35c
commit cf946b26fa
10 changed files with 37 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 8
description: 'Actions Required for v.1.3.0'
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 7
description: 'Actions Required for v.1.3.0'
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
description: 'Actions Required for v.1.3.0'
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
description: 'Actions Required for v.1.6.1'
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
description: 'Actions Required for v.1.7.0'
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
description: 'Actions Required for v.1.7.1'
---

View File

@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
description: 'Actions Required for v.1.7.3'
---

View File

@@ -0,0 +1,24 @@
---
sidebar_position: 1
description: 'Actions Required for v.1.7.6'
---
# v1.7.6
Version 1.7.6 of Medusa introduces some database schema changes which require running the migrations command.
## Overview
The latest versions of Medusa introduce the first implementations of Product Categories. The API layer of this feature is guarded by a [feature flag](../../feature-flags/toggle.md), but the changes to the database schema are not.
This release introduces another migration for Product Categories. So, it is required to run 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 migrations:
```bash
medusa migrations run
```

View File

@@ -3,7 +3,7 @@ const path = require("path")
const fs = require("fs")
const docsPath = path.join(__dirname, "../../docs/content")
const apisPath = path.join(__dirname, "../../docs/api")
const reverseSidebar = require('./src/utils/reverseSidebar')
// const reverseSidebar = require('./src/utils/reverseSidebar')
const algoliaAppId = process.env.ALGOLIA_APP_ID || "temp"
const algoliaApiKey = process.env.ALGOLIA_API_KEY || "temp"
@@ -205,10 +205,11 @@ const config = {
],
showLastUpdateTime: true,
// breadcrumbs: false,
async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) {
const sidebarItems = await defaultSidebarItemsGenerator(args);
return reverseSidebar(sidebarItems);
},
// async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) {
// const sidebarItems = await defaultSidebarItemsGenerator(args);
// console.log("here", sidebarItems, args.isCategoryIndex());
// return reverseSidebar(sidebarItems);
// },
},
theme: {
customCss: require.resolve("./src/css/custom.css")

View File

@@ -1,10 +0,0 @@
module.exports = function reverseSidebarItems(items) {
// Reverse items in categories
const result = items.map((item) => {
if (item.type === 'category' && item.customProps?.sort === 'desc') {
return {...item, items: reverseSidebarItems(item.items)};
}
return item;
});
return result;
}