mirror of
https://github.com/strapi/strapi.git
synced 2025-11-12 08:08:05 +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**
|
**2. Change the `collectionName` of the component**
|
||||||
|
|
||||||
**Before**
|
**Before**
|
||||||
`./api/components/category/component.json`
|
`./components/component.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -506,7 +506,7 @@ RENAME TABLE groups_old_table_name TO components_new_table_name;
|
|||||||
```
|
```
|
||||||
|
|
||||||
**After**
|
**After**
|
||||||
`./api/components/category/component.json`
|
`./components/component.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -533,7 +533,6 @@ SET related_type = 'components_new_table_name'
|
|||||||
WHERE related_type = 'groups_old_table_name';
|
WHERE related_type = 'groups_old_table_name';
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### Mongo
|
#### 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.
|
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**
|
**3. Change the `collectionName` of the component**
|
||||||
|
|
||||||
**Before**
|
**Before**
|
||||||
`./api/components/category/component.json`
|
`./components/component.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -576,7 +575,7 @@ db.collection.renameCollection('groups_my_group', 'components_my_component');
|
|||||||
```
|
```
|
||||||
|
|
||||||
**After**
|
**After**
|
||||||
`./api/components/category/component.json`
|
`./components/component.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user