strapi/docs/v3.x/migration-guide/migration-guide-alpha.9-to-alpha.10.md

71 lines
2.1 KiB
Markdown
Raw Normal View History

2018-12-14 17:06:05 +01:00
# Migration guide from alpha.9 to alpha.10
**Here are the major changes:**
- Add database store config
- New lib input
2018-12-14 17:06:05 +01:00
<br>
2019-11-07 12:05:39 +01:00
::: tip
2018-12-14 17:06:05 +01:00
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.10.1` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.10.1 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
2018-12-14 17:06:05 +01:00
<br>
## Configurations
2018-02-15 16:47:57 +01:00
You will have to update just 1 file: `package.json`
2018-02-15 16:47:57 +01:00
- Edit the Strapi's dependencies version: (move Strapi's dependencies to `3.0.0-alpha.10.1` version) in `package.json` file
```json
{
"dependencies": {
"lodash": "4.x.x",
2018-02-15 16:47:57 +01:00
"strapi": "3.0.0-alpha.10.1",
"strapi-mongoose": "3.0.0-alpha.10.1"
}
}
```
2018-12-14 17:06:05 +01:00
<br>
## Update the Admin
Delete your old admin folder and replace it by the new one.
2018-12-14 17:06:05 +01:00
<br>
## Update the Plugins
Copy this file `/plugins/users-permissions/config/jwt.json` **from your old project** and paste it in the corresponding one in your new project.
2019-01-06 14:00:04 +01:00
Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` and `/plugins/users-permissions/config/jwt.json` file in the new one.
Then, delete your old `plugins` folder and replace it by the new one.
2018-12-14 17:06:05 +01:00
<br>
2019-11-07 12:05:39 +01:00
## ⚠️ Config in database
To let you update your configurations when your application is deployed on multiple server instances, we have created a data store for settings. So we moved all the `users-permissions` plugin's configs in database.
2018-02-15 17:01:10 +01:00
You will have to reconfigure all your `users-permissions` configs from the admin panel. Then delete the `advanced.json`, `email.json` and `grant.json` files from `plugins/users-permissions/config` folder.
2018-12-14 17:06:05 +01:00
<br>
2019-11-07 12:05:39 +01:00
## ⚠️ Data type Number
2018-02-15 16:47:57 +01:00
We fixed how mongoose handles the model's `Number` type. Previously, mongoose stored `Number` type as `String` and now it's `Integer`. So you will have to update all your documents which have a type `Number` in its model and replace their `String` value with a `Number` one.
That's all, you have now upgraded to Strapi `alpha.10`.