|
|
@ -1,6 +1,7 @@ |
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { Injectable } from '@nestjs/common'; |
|
|
|
import { isVirtualCol, ModelTypes, RelationTypes, UITypes } from 'nocodb-sdk'; |
|
|
|
import { isVirtualCol, ModelTypes, RelationTypes, UITypes } from 'nocodb-sdk'; |
|
|
|
import { T } from 'nc-help'; |
|
|
|
import { T } from 'nc-help'; |
|
|
|
|
|
|
|
import { pluralize, singularize } from 'inflection'; |
|
|
|
import { Base, Column, Model, Project } from '../models'; |
|
|
|
import { Base, Column, Model, Project } from '../models'; |
|
|
|
import ModelXcMetaFactory from '../db/sql-mgr/code/models/xc/ModelXcMetaFactory'; |
|
|
|
import ModelXcMetaFactory from '../db/sql-mgr/code/models/xc/ModelXcMetaFactory'; |
|
|
|
import getColumnUiType from '../helpers/getColumnUiType'; |
|
|
|
import getColumnUiType from '../helpers/getColumnUiType'; |
|
|
@ -757,6 +758,10 @@ export class MetaDiffsService { |
|
|
|
fk_child_column_id: childCol.id, |
|
|
|
fk_child_column_id: childCol.id, |
|
|
|
virtual: false, |
|
|
|
virtual: false, |
|
|
|
fk_index_name: change.cstn, |
|
|
|
fk_index_name: change.cstn, |
|
|
|
|
|
|
|
meta: { |
|
|
|
|
|
|
|
plural: pluralize(childModel.title), |
|
|
|
|
|
|
|
singular: singularize(childModel.title), |
|
|
|
|
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -1055,6 +1060,10 @@ export class MetaDiffsService { |
|
|
|
belongsToCols[1].colOptions.fk_child_column_id, |
|
|
|
belongsToCols[1].colOptions.fk_child_column_id, |
|
|
|
type: RelationTypes.MANY_TO_MANY, |
|
|
|
type: RelationTypes.MANY_TO_MANY, |
|
|
|
uidt: UITypes.Links, |
|
|
|
uidt: UITypes.Links, |
|
|
|
|
|
|
|
meta: { |
|
|
|
|
|
|
|
plural: pluralize(modelB.title), |
|
|
|
|
|
|
|
singular: singularize(modelB.title), |
|
|
|
|
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isRelationAvailInB) { |
|
|
|
if (!isRelationAvailInB) { |
|
|
@ -1075,6 +1084,10 @@ export class MetaDiffsService { |
|
|
|
belongsToCols[0].colOptions.fk_child_column_id, |
|
|
|
belongsToCols[0].colOptions.fk_child_column_id, |
|
|
|
type: RelationTypes.MANY_TO_MANY, |
|
|
|
type: RelationTypes.MANY_TO_MANY, |
|
|
|
uidt: UITypes.Links, |
|
|
|
uidt: UITypes.Links, |
|
|
|
|
|
|
|
meta: { |
|
|
|
|
|
|
|
plural: pluralize(modelA.title), |
|
|
|
|
|
|
|
singular: singularize(modelA.title), |
|
|
|
|
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|