# v4.5.1 to v4.6.1 migration guide
The Strapi v4.5.1 to v4.6.1 migration guide upgrades v4.5.1 to v4.6.1. We introduced a configuration for webhooks to receive populated relations. The migration guide consists of:
- Upgrading the application dependencies
- Changing the webhooks configuration (optional)
- Reinitializing the application
# Upgrading the application dependencies to 4.6.1
PREREQUISITES
Stop the server before starting the upgrade.
Upgrade all of the Strapi packages in
package.jsonto4.6.1:// path: package.json { // ... "dependencies": { "@strapi/strapi": "4.6.1", "@strapi/plugin-users-permissions": "4.6.1", "@strapi/plugin-i18n": "4.6.1" // ... } }1
2
3
4
5
6
7
8
9
10
11Save the edited
package.jsonfile.Run either
yarnornpm installto install the new version.
💡 TIP
If the operation doesn't work, try removing your yarn.lock or package-lock.json. If that doesn't help, remove the node_modules folder as well and try again.
# Changing the webhooks configuration (optional)
By default, and for backward compatibility reasons, webhooks will receive the entity with its relations populated again. We do recommend to disable this behavior if you were not using it, as it may cause performance issues when having many relations. If you need populated relations in your webhook, we recommend doing a separate query in your webhook listenner to fetch the entity only with the necessary data.
If you want to change this behavior, you can do so by editing the ./config/server.js file (or ./config/server.ts if you are using TypeScript) and add the following configuration:
'use strict';
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
url: 'http://localhost:1337',
webhooks: {
// <--- Add this to not receive populated relations in webhooks
populateRelations: false,
},
});
2
3
4
5
6
7
8
9
10
11
With this, you will no longer receive populated relations in webhooks, and response times on the Content Manager will be shorter.
You can see more of the available configuration options in the server configuration documentation.
# Reinitializing the application
Rebuild the administration panel and start the application: