Now that you have installed the new database package. You need to update your `database.json` configuration files located in `./config/environments/{env}/database.json`.
You can now only use the connector name instead of the complete package name.
**Before**
```json
{
"defaultConnection": "default",
"connections": {
"default": {
"connector": "strapi-hook-bookshelf",
"settings": {
//...
},
"options": {}
}
}
}
```
**After**
```json
{
"defaultConnection": "default",
"connections": {
"default": {
"connector": "bookshelf",
"settings": {
//...
},
"options": {
//...
}
}
}
}
```
## `ctx.state.user`
Previously the ctx.state.user was populated with the user informations, its role and permissions. To avoid perfromance issues the role is the only populated relation on the user by default.
We introduced new types in the admin panel: `date`, `datetime` and `time`. Before all of those types where saved as `datetime`.
You will need to change the type of your fields from `date` to `datetime` if you don't want to migrate your data.
- To migrate yout old `date` to `datetime`, change the field type from `date` to `datetime`. NO data migration is required.
- To migrate your old `date` to new `date`, you will need to migrate yout data to be of the format: `YYYY-MM-DD`
- To migrate your old `date` to the new `time`, change the field type from `date` to `time`. You will also need to transform them to be of the format: `HH:mm:ss.SSS`
If you want to rename them you have 3 steps to follow:
**1. Rename the table in your DB (you can use the table renaming query shown above).**
:::: tabs
::: tab Sqlite
```sql
ALTER TABLE groups_old_table_name
RENAME TO components_new_table_name;
```
:::
::: tab Postgres
```sql
ALTER TABLE groups_old_table_name
RENAME TO components_new_table_name;
```
:::
::: tab Mysql
```sql
-- renaming the table
RENAME TABLE groups_old_table_name TO components_new_table_name;
```
:::
::::
**2. Change the `collectionName` of the component**
**Before**
`./api/components/category/component.json`
```json
{
"collectionName": "groups_old_table_name"
//...
}
```
**After**
`./api/components/category/component.json`
```json
{
"collectionName": "components_new_table_name"
//....
}
```
**3. Update the `component_type` values in the join tables**
_Repeat this query for every join table where you are using this component._
```sql
UPDATE restaurant_components
SET component_type = 'groups_old_table_name'
WHERE component_type = 'components_new_table_name';
```
#### Mongo
In `mongo` the relation between a content type and its components is held in an array of references. To know which component type it referes to, the array also contains a `kind` attribute containing the component Schema name.
**How to migrate**
**1. Get your new global ids**
The `kind` attribute references the Strapi `globalId` of a model. To get your component global ids run:
The admin panel contains certain assets that use `data:img;base64` images. To allow rendering of those assets you can update the files `./config/environments/{env}/security.json` as follows:
**Before**
```json
{
"csp": {
"enabled": true,
"policy": [
{
"img-src": "'self' http:"
},
"block-all-mixed-content"
]
}
//....
}
```
**After**
```json
{
"csp": {
"enabled": true,
"policy": ["block-all-mixed-content"]
}
//....
}
```
If you need more fine control you can also simply add the `data:` option to the `img-src` option.