mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 02:16:03 +00:00
Fix compo file path
Update the path of component file for the database collection update. fix #4866
This commit is contained in:
parent
79e7153adb
commit
cb7e24da2a
@ -496,7 +496,7 @@ RENAME TABLE groups_old_table_name TO components_new_table_name;
|
||||
**2. Change the `collectionName` of the component**
|
||||
|
||||
**Before**
|
||||
`./api/components/category/component.json`
|
||||
`./components/component.json`
|
||||
|
||||
```json
|
||||
{
|
||||
@ -506,7 +506,7 @@ RENAME TABLE groups_old_table_name TO components_new_table_name;
|
||||
```
|
||||
|
||||
**After**
|
||||
`./api/components/category/component.json`
|
||||
`./components/component.json`
|
||||
|
||||
```json
|
||||
{
|
||||
@ -533,7 +533,6 @@ SET related_type = 'components_new_table_name'
|
||||
WHERE related_type = 'groups_old_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.
|
||||
@ -566,7 +565,7 @@ db.collection.renameCollection('groups_my_group', 'components_my_component');
|
||||
**3. Change the `collectionName` of the component**
|
||||
|
||||
**Before**
|
||||
`./api/components/category/component.json`
|
||||
`./components/component.json`
|
||||
|
||||
```json
|
||||
{
|
||||
@ -576,7 +575,7 @@ db.collection.renameCollection('groups_my_group', 'components_my_component');
|
||||
```
|
||||
|
||||
**After**
|
||||
`./api/components/category/component.json`
|
||||
`./components/component.json`
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user