Merge branch 'master' into fix/travis

This commit is contained in:
Jim LAURIE 2018-12-14 17:17:30 +01:00 committed by GitHub
commit d761f98821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 1334 additions and 15 deletions

View File

@ -132,7 +132,7 @@ module.exports = {
title: '📚 Resources',
children: [
['https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md', 'Contributing guide'],
['https://github.com/strapi/strapi/wiki', 'Migration guides'],
'/3.x.x/migration-guide/',
'/3.x.x/tutorials/',
],
},

View File

@ -0,0 +1,24 @@
# Migrations guides
- [Migrating from v1 to v3](migration-guide-1-to-3.md)
- [Migration guide from alpha.7.4 to alpha.8](migration-guide-alpha.7.4-to-alpha.8.md)
- [Migration guide from alpha.8 to alpha.9](migration-guide-alpha.8-to-alpha.9.md)
- [Migration guide from alpha.9 to alpha.10](migration-guide-alpha.9-to-alpha.10.md)
- [Migration guide from alpha.10 to alpha.11](migration-guide-alpha.10-to-alpha.11.md)
- [Migration guide from alpha.11 to alpha.12](migration-guide-alpha.11-to-alpha.12.md)
- [Migration guide from alpha.12.1 to alpha.12.2](migration-guide-alpha.12.1-to-alpha.12.2.md)
- [Migration guide from alpha.12.2 to alpha.12.3](migration-guide-alpha.12.2-to-alpha.12.3.md)
- [Migration guide from alpha.12.3 to alpha.12.4](migration-guide-alpha.12.3-to-alpha.12.4.md)
- [Migration guide from alpha.12.4 to alpha.12.5](migration-guide-alpha.12.4-to-alpha.12.5.md)
- [Migration guide from alpha.12.5 to alpha.12.6](migration-guide-alpha.12.5-to-alpha.12.6.md)
- [Migration guide from alpha.12.6 to alpha.12.7](migration-guide-alpha.12.6-to-alpha.12.7.md)
- [Migration guide from alpha.12.7 to alpha.13](migration-guide-alpha.12.7-to-alpha.13.md)
- [Migration guide from alpha.13 to alpha.13.1](migration-guide-alpha.13-to-alpha.13.1.md)
- [Migration guide from alpha.13.1 to alpha.14](migration-guide-alpha.13.1-to-alpha.14.md)
- [Migration guide from alpha.14 to alpha.14.1](migration-guide-alpha.14-to-alpha.14.1.md)
- [Migration guide from alpha.14.1 to alpha.14.2](migration-guide-alpha.14.1-to-alpha.14.2.md)
- [Migration guide from alpha.14.2 to alpha.14.3](migration-guide-alpha.14.2-to-alpha.14.3.md)
- [Migration guide from alpha.14.3 to alpha.14.4](migration-guide-alpha.14.3-to-alpha.14.4.md)
- [Migration guide from alpha.14.4 to alpha.14.5](migration-guide-alpha.14.4-to-alpha.14.5.md)
- [Migration guide from alpha.14.5 to alpha.15](migration-guide-alpha.14.5-to-alpha.15.md)
- [Migration guide from alpha.15 to alpha.16](migration-guide-alpha.15-to-alpha.16.md)

View File

@ -10,7 +10,9 @@ To be honest with all of you, the migration process won't be easy. The new versi
- Removed middlewares from core (koa-graphql, koa-proxy, koa-ssl, koa-views).
- Better error handling with Boom.
> Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
## Getting started
@ -33,7 +35,7 @@ The structure of the configurations has been harmonised and simplified. Files ha
- `./config/environments/**/response.json` added
- `./config/environments/**/custom.json` added
Please refer to the [new documentation](../configurations/configurations.md) to set the correct values in each file.
Please refer to the [new documentation](https://github.com/strapi/strapi/blob/master/docs/3.x.x/en/configurations/configurations.md) to set the correct values in each file.
::: note

View File

@ -1,11 +1,17 @@
# Migrating from 3.0.0-alpha.10 to 3.0.0-alpha.11
# Migration guide from alpha.10 to alpha.11
**Here are the major changes:**
- Add plugin upload
> Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
@ -13,6 +19,8 @@ Install Strapi `alpha.11.1` globally on your computer. To do so run `npm install
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Configurations
You will have to update just 1 file: `package.json`
@ -29,11 +37,13 @@ You will have to update just 1 file: `package.json`
}
```
<br>
## Update the Admin
Delete your old admin folder and replace it by the new one.
<br>
## Update the Plugins
@ -43,6 +53,8 @@ Copy the fields and relations you had in your `/plugins/users-permissions/models
Then, delete your old `plugins` folder and replace it by the new one.
<br>
## Update the Dependencies
Now let's update the dependencies in your `package.json` we edited earlier. Simply run `npm install`:

View File

@ -1,9 +1,15 @@
# Migrating from 3.0.0-alpha.11 to 3.0.0-alpha.12.1.3
# Migration guide from alpha.11 to alpha.12
This migration guide is a mix of migrations from 3.0.0-alpha.11.1 to 3.0.0-alpha.11.2, 3.0.0-alpha.11.2 to 3.0.0-alpha.11.3 and from 3.0.0-alpha.11.3 to 3.0.0-alpha.12.1.3.
> Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
@ -11,6 +17,8 @@ Install Strapi `alpha.12.1.3` globally on your computer. To do so run `npm insta
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Configurations
You will have to update just 1 file: `package.json`
@ -27,11 +35,13 @@ You will have to update just 1 file: `package.json`
}
```
<br>
## Update the Admin
Delete your old admin folder and replace it by the new one.
<br>
## Update the Plugins
@ -39,9 +49,13 @@ Copy the fields and relations you had in your `/plugins/users-permissions/models
Then, delete your old `plugins` folder and replace it by the new one.
<br>
## Update roles
> This update is if you come from version before alpha-11.2
::: note
This update is if you come from version before alpha-11.2
:::
Update `type` of `Guest` role to `public` in your database. You can also update name and description:
@ -67,9 +81,11 @@ In `Users & Permissions > Advanced` in admin panel update default role to `Auth
You also will have to reset your roles permissions.
<br>
### Update bookshelf filters
::: warning
::: note
This update is if you come from version before alpha-11.3
:::

View File

@ -0,0 +1,135 @@
# Migration guide from alpha.12.1 to alpha.12.2
**Here are the major changes:**
- Update relation management
- Fix many bugs and enhancement
**Usefull links:**
- Change log: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.2](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.2)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.1.3...v3.0.0-alpha.12.2 ](https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.1.3...v3.0.0-alpha.12.2 )
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.12.2` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.12.2 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.12.2` version) of your project.
Run `npm install strapi@3.0.0-alpha.12.2 --save` to update your strapi version and then run the same command for `strapi-mongoose` or `strapi-bookshelf` depending of the module you use in your application.
<br>
## Update the Admin
::: note
If you did custom update of the admin, you will have to manually migrate your update.
:::
Delete your old admin folder and replace it by the new one.
<br>
## Update the Plugins
::: note
If you did custom update on one of the plugin, you will have to manually migrate your update.
:::
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.
<br>
## ⚠️ Update API services
You will have to update services of you generated API.
Replace `Article` by your Content Type name in each functions.
For `add` function:
```js
add: async (values) => {
// Extract values related to relational data.
const relations = _.pick(values, Article.associations.map(ast => ast.alias));
const data = _.omit(values, Article.associations.map(ast => ast.alias));
// Create entry with no-relational data.
const entry = await Article.create(data);
// Create relational data and return the entry.
return Article.updateRelations({ id: entry.id, values: relations });
},
```
For `edit` function:
```js
edit: async (params, values) => {
// Extract values related to relational data.
const relations = _.pick(values, Article.associations.map(a => a.alias));
const data = _.omit(values, Article.associations.map(a => a.alias));
// Update entry with no-relational data.
const entry = await Article.update(params, data, { multi: true });
// Update relational data and return the entry.
return Article.updateRelations(Object.assign(params, { values: relations }));
},
```
For `remove` function:
```js
remove: async params => {
// Select field to populate.
const populate = Article.associations
.filter(ast => ast.autoPopulate !== false)
.map(ast => ast.alias)
.join(' ');
// Note: To get the full response of Mongo, use the `remove()` method
// or add spent the parameter `{ passRawResult: true }` as second argument.
const data = await Article
.findOneAndRemove(params, {})
.populate(populate);
if (!data) {
return data;
}
await Promise.all(
Article.associations.map(async association => {
const search = _.endsWith(association.nature, 'One') || association.nature === 'oneToMany' ? { [association.via]: data._id } : { [association.via]: { $in: [data._id] } };
const update = _.endsWith(association.nature, 'One') || association.nature === 'oneToMany' ? { [association.via]: null } : { $pull: { [association.via]: data._id } };
// Retrieve model.
const model = association.plugin ?
strapi.plugins[association.plugin].models[association.model || association.collection] :
strapi.models[association.model || association.collection];
return model.update(search, update, { multi: true });
})
);
return data;
}
```
That's all, you have now upgraded to Strapi `alpha.12.2`.

View File

@ -0,0 +1,154 @@
# Migration guide from alpha.12.2 to alpha.12.3
**Here are the major changes:**
- Framework tests suite
- Filters in the Content Manager plugin
- One way relation in the Content-Type Builder
- GraphQL update: timestamp fields update and some bug fixes
- Fix delete manyToMany relations with Mongoose
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.3](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.3)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.2...v3.0.0-alpha.12.3](https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.2...v3.0.0-alpha.12.3)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.12.3` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.12.3 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.12.3` version) of your project.
Run `npm install strapi@3.0.0-alpha.12.3 --save` to update your strapi version and then run the same command for `strapi-mongoose` or `strapi-bookshelf` depending on the module you use in your application.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
## ⚠️ Warning for SQL users
Please check your `decimal` data type. If in the past you received `string` instead of `number` the issue has been fixed.
Same thing for `boolean` type, if in the past you received `1` and `0` instead of `true` and `false`. We fixed it.
<br>
## ⚠️ Warning for GraphQL users
GraphQL timestamp attribute change. If you are using `mongoose` nothing will change for you.
If you are using `bookshelf` you will have to change `created_at` and `updated_at` by `createdAt` and `updatedAt`
<br>
## Add count route
You need to add a new route in your API.
Update the `./api/:name/config/route.json` file to add the new route. ⚠️ put it BEFORE the findOne route.
```json
{
"method": "GET",
"path": "/article/count",
"handler": "Article.count",
"config": {
"policies": []
}
}
```
Then update your controller's file and add the count action.
```js
/**
* Count article records.
*
* @return {Number}
*/
count: async (ctx) => {
return strapi.services.article.count(ctx.query);
}
```
For Mongo applications update the service of your API with the following code:
```js
/**
* Promise to count articles.
*
* @return {Promise}
*/
count: (params) => {
// Convert `params` object to filters compatible with Mongo.
const filters = strapi.utils.models.convertParams('article', params);
return Article
.count()
.where(filters.where);
}
```
And for Postgres and MySQL applications with this one:
```js
/**
* Promise to count a/an article.
*
* @return {Promise}
*/
count: (params) => {
// Convert `params` object to filters compatible with Bookshelf.
const filters = strapi.utils.models.convertParams('article', params);
return Article.query(function(qb) {
_.forEach(filters.where, (where, key) => {
if (_.isArray(where.value)) {
for (const value in where.value) {
qb[value ? 'where' : 'orWhere'](key, where.symbol, where.value[value])
}
} else {
qb.where(key, where.symbol, where.value);
}
});
}).count();
}
```
That's all, you have now upgraded to Strapi `alpha.12.3`.

View File

@ -0,0 +1,60 @@
# Migration guide from alpha.12.3 to alpha.12.4
**Here are the major changes:**
- Add search to content manager
- Add bulk actions in content-manager
- Add Enumeration type to content type builder
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.4](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.4)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.3...v3.0.0-alpha.12.4](https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.3...v3.0.0-alpha.12.4)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.12.4` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.12.4 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.12.4` version) of your project.
Run `npm install strapi@3.0.0-alpha.12.4 --save` to update your strapi version and then run the same command for `strapi-mongoose` or `strapi-bookshelf` depending on the module you use in your application.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
That's all, you have now upgraded to Strapi `alpha.12.4`.

View File

@ -0,0 +1,59 @@
# Migration guide from alpha.12.4 to alpha.12.5
**Here are the major changes:**
- Email providers Mailgun and Sendgrid
- Add Arabic language
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.5](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.5)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.4...v3.0.0-alpha.12.5](https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.4...v3.0.0-alpha.12.5)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.12.5` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.12.5 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.12.5` version) of your project.
Run `npm install strapi@3.0.0-alpha.12.5 --save` to update your strapi version and then run the same command for `strapi-mongoose` or `strapi-bookshelf` depending on the module you use in your application.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
That's all, you have now upgraded to Strapi `alpha.12.5`.

View File

@ -0,0 +1,66 @@
# Migration guide from alpha.12.5 to alpha.12.6
**Here are the major changes:**
- JSON input editor
- Support JSON format for SQL databases
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.6](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.6)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.5...v3.0.0-alpha.12.6](https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.5...v3.0.0-alpha.12.6)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.12.6` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.12.6 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.12.6` version) of your project.
Run `npm install strapi@3.0.0-alpha.12.6 --save` to update your strapi version and then run the same command for `strapi-mongoose` or `strapi-bookshelf` depending on the module you use in your application.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
## ⚠️ Warning for SQL users
Now you will receive an object instead of a stringify object for the JSON type.
The data type has changed so if your application applies transformation on your JSON data, you may have to update your code.
That's all, you have now upgraded to Strapi `alpha.12.6`.

View File

@ -0,0 +1,59 @@
# Migration guide from alpha.12.6 to alpha.12.7
**Here are the major changes:**
- Yarn support
- Search in generated API
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.7](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.12.7)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.6...v3.0.0-alpha.12.7](https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.6...v3.0.0-alpha.12.7)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.12.7` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.12.7 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.12.7` version) of your project.
Run `npm install strapi@3.0.0-alpha.12.7 --save` to update your strapi version and then run the same command for `strapi-mongoose` or `strapi-bookshelf` depending on the module you use in your application.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
That's all, you have now upgraded to Strapi `alpha.12.7`.

View File

@ -0,0 +1,65 @@
# Migration guide from alpha.12.7 to alpha.13
**Here are the major changes:**
- Rename hook name
- New settings for content manager plugin
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.13](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.13)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.7...v3.0.0-alpha.13.0.1](https://github.com/strapi/strapi/compare/v3.0.0-alpha.12.7...v3.0.0-alpha.13.0.1)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.13` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.13.0.1 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.13.0.1` version) of your project.
Run `npm install strapi@3.0.0-alpha.13.0.1 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
## ⚠️ Update hook name
We update the name of the hook and the way we load them. `strapi-mongoose` is now `strapi-hook-mongoose`. This rename is needed for `strapi-bookshelf` and `strapi-knex`.
As you can imagine, you also will have to update your hooks' dependencies in the `package.json` of your application.
You also will have to update connectors of you database connections. Update in `./config/environments/**/database.json` file the `connector` key.
That's all, you have now upgraded to Strapi `alpha.13`.

View File

@ -0,0 +1,60 @@
# Migration guide from alpha.13 to alpha.13.1
**Here are the major changes:**
- Translations update
- New email and login providers
- Admin security fix
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.13.1](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.13.1)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.13.0.1...v3.0.0-alpha.13.1](https://github.com/strapi/strapi/compare/v3.0.0-alpha.13.0.1...v3.0.0-alpha.13.1)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.13.1` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.13.1 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.13.1` version) of your project.
Run `npm install strapi@3.0.0-alpha.13.1 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
That's all, you have now upgraded to Strapi `alpha.13.1`.

View File

@ -0,0 +1,77 @@
# Migration guide from alpha.13.1 to alpha.14
**Here are the major changes:**
- New configuration of the content manager
- GraphQL Aggregation Feature
- Email confirmation and block user feature
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.13.1...v3.0.0-alpha.14](https://github.com/strapi/strapi/compare/v3.0.0-alpha.13.1...v3.0.0-alpha.14)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.14` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.14 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.14` version) of your project.
Run `npm install strapi@3.0.0-alpha.14 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
## Reset your content manager settings
We added a new section in the content manager configurations. You are now able to customize the inputs displayed in the contribution view.
The stored data format has been changed. That is why you **will have** to **delete** in the `core_store` collection/table the entry with the `key` `plugin_content-manager_schema`.
Then take a ☕️ and take few minutes to reconfigure your stuffs.
Hope you will enjoy this new feature.
<br>
## Heroku setups
It's necessary to add `DATABASE_NAME` into your environment variable otherwise your app doesn't start.
<br>
That's all, you have now upgraded to Strapi `alpha.14`.

View File

@ -0,0 +1,59 @@
# Migration guide from alpha.14 to alpha.14.1
**Here are the major changes:**
- Improve developer experience (Open browser, update documentation)
- Fix auto reload
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.1](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.1)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.14...v3.0.0-alpha.14.1](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14...v3.0.0-alpha.14.1)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.14.1` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.14.1.1 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.14.1.1` version) of your project.
Run `npm install strapi@3.0.0-alpha.14.1.1 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
That's all, you have now upgraded to Strapi `alpha.14.1.1`.

View File

@ -0,0 +1,66 @@
# Migration guide from alpha.14.1 to alpha.14.2
**Here are the major changes:**
- Generated API routes are now pluralized 💥
- Fix send email method
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.2](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.2)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.1...v3.0.0-alpha.14.2](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.1...v3.0.0-alpha.14.2)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.14.2` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.14.2 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.14.2` version) of your project.
Run `npm install strapi@3.0.0-alpha.14.2 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
## ⚠️ Users API routes pluralized 💥
Since the routes are now pluralized ([issue](https://github.com/strapi/strapi/issues/504) - [pr](https://github.com/strapi/strapi/pull/1725)) you might need to update them in your client app.
Routes list [here](https://github.com/strapi/strapi/pull/1725/files#diff-8836e4ea317896c004860b47776c800f)
<br>
That's all, you have now upgraded to Strapi `alpha.14.2`.

View File

@ -0,0 +1,59 @@
# Migration guide from alpha.14.2 to alpha.14.3
**Here are the major changes:**
- Many little fixes
- Update missing translations
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.3](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.3)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.2...v3.0.0-alpha.14.3](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.2...v3.0.0-alpha.14.3)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.14.3` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.14.3 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.14.3` version) of your project.
Run `npm install strapi@3.0.0-alpha.14.3 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
That's all, you have now upgraded to Strapi `alpha.14.3`.

View File

@ -0,0 +1,83 @@
# Migration guide from alpha.14.3 to alpha.14.4
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.4.0](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.4.0)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.3...v3.0.0-alpha.14.4.0](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.3...v3.0.0-alpha.14.4.0)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.14.4.0` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.14.4.0 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.14.4.0` version) of your project.
Run `npm install strapi@3.0.0-alpha.14.4.0 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
## Update Bookshelf services
We update generated API with bookshelf.
In `fetchAll` function replace `if (_.isArray(where.value)) {` with `if (_.isArray(where.value) && where.symbol !== 'IN') {`
::: note
From this change [https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.3...v3.0.0-alpha.14.4.0#diff-61ba361ed6161efcd5f4e583001cc9c9](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.3...v3.0.0-alpha.14.4.0#diff-61ba361ed6161efcd5f4e583001cc9c9)
:::
## Update Mongoose services
We update generated API with mongoose.
In `remove` function add the following condition:
```js
await Promise.all(
<%= globalID %>.associations.map(async association => {
if (!association.via || !data._id) {
return true;
}
```
::: note
From this change [https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.3...v3.0.0-alpha.14.4.0#diff-c36b911d1bc2922e1d7cf93ae692e054](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.3...v3.0.0-alpha.14.4.0#diff-c36b911d1bc2922e1d7cf93ae692e054)
:::
<br>
That's all, you have now upgraded to Strapi `alpha.14.4.0`.

View File

@ -0,0 +1,59 @@
# Migration guide from alpha.14.4 to alpha.14.5
**Here are the major changes:**
- Add Graphql Query For The Current User
- Fix on GraphQL query relation data
- Update documentation and translations
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.5](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.14.5)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.4.0...v3.0.0-alpha.14.5](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.4.0...v3.0.0-alpha.14.5)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.14.5` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.14.5 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.14.5` version) of your project.
Run `npm install strapi@3.0.0-alpha.14.5 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
<br>
That's all, you have now upgraded to Strapi `alpha.14.5`.

View File

@ -0,0 +1,90 @@
# Migration guide from alpha.14.5 to alpha.15
**Here are the major changes:**
- Relations on filter
- Update provider prefix
- Fix proxy for authentication providers
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.15](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.15)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.5...v3.0.0-alpha.15](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.5...v3.0.0-alpha.15)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.15` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.15 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.15` version) of your project.
Run `npm install strapi@3.0.0-alpha.15 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
## ⚠️ Bookshelf (Postgres and MySQL)
Go in [diff files](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.5...v3.0.0-alpha.15) and search for following files:
Services: `packages/strapi-generate-api/templates/bookshelf/service.template`
Life cycle: `packages/strapi-generate-model/templates/bookshelf/model.template`
You will have to update all your service by applying the diff.
<br>
## ⚠️ Mongoose (Mongo)
Go in [diff files](https://github.com/strapi/strapi/compare/v3.0.0-alpha.14.5...v3.0.0-alpha.15) and search for following files:
Service: `packages/strapi-generate-api/templates/mongoose/service.template`
You will have to update all your service by applying the diff.
<br>
## Providers
Like hook, middleware and plugin - we prefix plugin provider with provider
Format: strapi-provider-[plugin_name]-[provider]
eg. `strapi-email-sendmail` become `strapi-provider-email-sendmail`
We still support the old format for next version to let time to providers maintainers to make migration.
<br>
That's all, you have now upgraded to Strapi `alpha.15`.

View File

@ -0,0 +1,80 @@
# Migration guide from alpha.15 to alpha.16
**Here are the major changes:**
- Fix Relations on filter
**Useful links:**
- Changelog: [https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.16](https://github.com/strapi/strapi/releases/tag/v3.0.0-alpha.16)
- GitHub diff: [https://github.com/strapi/strapi/compare/v3.0.0-alpha.15...v3.0.0-alpha.16](https://github.com/strapi/strapi/compare/v3.0.0-alpha.15...v3.0.0-alpha.16)
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
Install Strapi `alpha.16` globally on your computer. To do so run `npm install strapi@3.0.0-alpha.16 -g`.
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Update node modules
Update the Strapi's dependencies version (move Strapi's dependencies to `3.0.0-alpha.16` version) of your project.
Run `npm install strapi@3.0.0-alpha.16 --save` to update your strapi version.
<br>
## Update the Admin
::: note
If you performed updates in the Admin, you will have to manually migrate your changes.
:::
Delete your old admin folder and replace it with the new one.
<br>
## Update the Plugins
::: note
If you did a custom update on one of the plugins, you will have to manually migrate your update.
:::
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 with the new one.
## ⚠️ Bookshelf (Postgres and MySQL)
Reverse of migration [alpha.14.5 to alpha.15](migration-guide-alpha.14.5-to-alpha.15) Bookshelf section.
Go in [diff files](https://github.com/strapi/strapi/compare/v3.0.0-alpha.15...v3.0.0-alpha.16) and search for following files:
Services: `packages/strapi-generate-api/templates/bookshelf/service.template`
Life cycle: `packages/strapi-generate-model/templates/bookshelf/model.template`
You will have to update all your service by applying the diff.
<br>
## ⚠️ Mongoose (Mongo)
Reverse of migration [alpha.14.5 to alpha.15](migration-guide-alpha.14.5-to-alpha.15) Mongoose section.
Go in [diff files](https://github.com/strapi/strapi/compare/v3.0.0-alpha.15...v3.0.0-alpha.16) and search for following files:
Service: `packages/strapi-generate-api/templates/mongoose/service.template`
You will have to update all your service by applying the diff.
<br>
That's all, you have now upgraded to Strapi `alpha.16`.

View File

@ -1,4 +1,4 @@
# Migrating from 3.0.0-alpha.7.3 to 3.0.0-alpha.8
# Migration guide from alpha.7.4 to alpha.8
**Here are the major changes:**
@ -6,7 +6,13 @@
- Setup database connection on project creation
- Helper for table creation for SQL database
> Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
@ -14,6 +20,8 @@ Install Strapi `alpha.8` globally on your computer. To do so run `npm install st
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Configurations
You will have to update just 1 file: `package.json`
@ -44,10 +52,14 @@ You will have to update just 1 file: `package.json`
}
```
<br>
## Update the Admin
Delete your old admin folder and replace by the new one.
<br>
## Update the Plugins
Copy these 3 files `/plugins/users-permissions/config/jwt.json`, `/plugins/users-permissions/config/roles.json` and `/plugins/users-permissions/models/User.settings.json` **from your old project** and paste them in the corresponding ones in your new project. It is important to save these files.

View File

@ -1,12 +1,17 @@
# Migrating from 3.0.0-alpha.8 to 3.0.0-alpha.9
# Migration guide from alpha.8 to 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.
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
@ -14,6 +19,8 @@ Install Strapi `alpha.9` globally on your computer. To do so run `npm install st
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Configurations
You will have to update just 2 files: `package.json` and `request.json`
@ -41,11 +48,13 @@ You will have to update just 2 files: `package.json` and `request.json`
}
```
<br>
## Update the Admin
Delete your old admin folder and replace it by the new one.
<br>
## Update the Plugins
@ -55,11 +64,13 @@ Copy the fields and relations you had in your `/plugins/users-permissions/models
Then, delete your old `plugins` folder and replace it by the new one.
<br>
## ⚠️ Roles update
Roles are now stored in your database. You will have to re-create and configure them via the admin dashboard.
<br>
## ⚠️ User collection/table name has changed

View File

@ -1,12 +1,17 @@
# Migrating from 3.0.0-alpha.9 to 3.0.0-alpha.10
# Migration guide from alpha.9 to alpha.10
**Here are the major changes:**
- Add database store config
- New lib input
> Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
<br>
::: note
Feel free to [join us on Slack](http://slack.strapi.io) and ask questions about the migration process.
:::
<br>
## Getting started
@ -14,6 +19,8 @@ Install Strapi `alpha.10.1` globally on your computer. To do so run `npm install
When it's done, generate a new empty project `strapi new myNewProject` (don't pay attention to the database configuration).
<br>
## Configurations
You will have to update just 1 file: `package.json`
@ -30,11 +37,13 @@ You will have to update just 1 file: `package.json`
}
```
<br>
## Update the Admin
Delete your old admin folder and replace it by the new one.
<br>
## Update the Plugins
@ -44,6 +53,7 @@ Copy the fields and relations you had in your `/plugins/users-permissions/models
Then, delete your old `plugins` folder and replace it by the new one.
<br>
## ⚠️ Config in database
@ -51,6 +61,7 @@ To let you update your configurations when your application is deployed on multi
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.
<br>
## ⚠️ Data type Number