From 9ef20e40b93fc00734e84cd264eaec5c17e35b38 Mon Sep 17 00:00:00 2001 From: Jim Laurie Date: Wed, 31 Jan 2018 12:25:18 +0100 Subject: [PATCH] Create migration guide from alpha.8 to alpha.9 Co-authored-by: soupette --- docs/3.x.x/en/SUMMARY.md | 1 + .../migration-guide-alpha-8-to-alpha-9.md | 71 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 docs/3.x.x/en/migration/migration-guide-alpha-8-to-alpha-9.md diff --git a/docs/3.x.x/en/SUMMARY.md b/docs/3.x.x/en/SUMMARY.md index 3e989ef5bb..e3b077afaa 100644 --- a/docs/3.x.x/en/SUMMARY.md +++ b/docs/3.x.x/en/SUMMARY.md @@ -54,3 +54,4 @@ ### Migration * [Migrating from v1 to v3](migration/migration-guide.md) * [Migrating from 3.0.0-alpha.7.4 to 3.0.0-alpha.8](migration/migration-guide-alpha-7-4-to-alpha-8.md) +* [Migrating from 3.0.0-alpha.8 to 3.0.0-alpha.9](migration/migration-guide-alpha-8-to-alpha-9.md) diff --git a/docs/3.x.x/en/migration/migration-guide-alpha-8-to-alpha-9.md b/docs/3.x.x/en/migration/migration-guide-alpha-8-to-alpha-9.md new file mode 100644 index 0000000000..c24aca4120 --- /dev/null +++ b/docs/3.x.x/en/migration/migration-guide-alpha-8-to-alpha-9.md @@ -0,0 +1,71 @@ +# Migrating from 3.0.0-alpha.8 to 3.0.0-alpha.9 + +**Here are the major changes:** + +- Put roles' permissions in database +- Providers connection (Facebook, GitHub, ...) + +> Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process. + + +## Getting started + +Install Strapi `alpha.9` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.9 -g`. + +When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration). + +## Configurations + +You will have to update just 2 files: `package.json` and `request.json` + +- Edit the Strapi's dependencies version: (move Strapi's dependencies to `3.0.0-alpha.9` version) in `package.json` file + +```json +{ + "dependencies": { + "lodash": "4.x.x", + "strapi": "3.0.0-alpha.9", + "strapi-mongoose": "3.0.0-alpha.9" + } +} +``` + + +- Edit the `session.enabled` settings to `true` in each environment file: `/configs/environments/***/request.json` + +```json +{ + "session": { + "enabled": true + } +} +``` + + +## Update the Admin + +Delete your old admin folder and replace it by the new one. + + +## 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. + +Copy the fields and relations you had in your `/plugins/users-permissions/models/User.settings.json` file in the new one. + +Then, delete your old `plugins` folder and replace it by the new one. + + +## ⚠️ Roles update + +Roles are now stored in your database. You will have to re-create and configure them via the admin dashboard. + + +## ⚠️ User collection/table name has changed + +If you have an existing set of users in your database you will have to rename the collection/table from `user` to `users-permissions_user`. + +Then update all your users by changing the old role id by the new one which is in `users-permissions_role` collection/table. + + +That's all, you have now upgraded to Strapi `alpha.9`.