Standard migration command (#2236)
* Add Standard Object migration commands * rebase * add sync-tenant-metadata command * fix naming * renaming command class names * remove field deletion and use object cascade instead --------- Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
This commit is contained in:
@ -0,0 +1,113 @@
|
||||
{
|
||||
"nameSingular": "personV2",
|
||||
"namePlural": "peopleV2",
|
||||
"labelSingular": "Person",
|
||||
"labelPlural": "People",
|
||||
"targetTableName": "person",
|
||||
"description": "A person",
|
||||
"icon": "people",
|
||||
"fields": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "firstName",
|
||||
"label": "First Name",
|
||||
"targetColumnMap": {
|
||||
"value": "firstName"
|
||||
},
|
||||
"description": "First Name of the person",
|
||||
"icon": null,
|
||||
"isNullable": true
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "lastName",
|
||||
"label": "Last Name",
|
||||
"targetColumnMap": {
|
||||
"value": "lastName"
|
||||
},
|
||||
"description": "Last Name of the person",
|
||||
"icon": null,
|
||||
"isNullable": true
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "email",
|
||||
"label": "Email",
|
||||
"targetColumnMap": {
|
||||
"value": "email"
|
||||
},
|
||||
"description": "Email of the person",
|
||||
"icon": null,
|
||||
"isNullable": true
|
||||
},
|
||||
{
|
||||
"type": "phone",
|
||||
"name": "phone",
|
||||
"label": "Phone",
|
||||
"targetColumnMap": {
|
||||
"value": "phone"
|
||||
},
|
||||
"description": "phone of the company",
|
||||
"icon": null,
|
||||
"isNullable": true
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "city",
|
||||
"label": "City",
|
||||
"targetColumnMap": {
|
||||
"value": "city"
|
||||
},
|
||||
"description": "City of the person",
|
||||
"icon": null,
|
||||
"isNullable": true
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "jobTitle",
|
||||
"label": "Job Title",
|
||||
"targetColumnMap": {
|
||||
"value": "jobTitle"
|
||||
},
|
||||
"description": "Job title of the person",
|
||||
"icon": null,
|
||||
"isNullable": true
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"name": "linkedinUrl",
|
||||
"label": "Linkedin URL",
|
||||
"targetColumnMap": {
|
||||
"text": "Linkedin URL",
|
||||
"link": "linkedinUrl"
|
||||
},
|
||||
"description": "Linkedin URL of the person",
|
||||
"icon": "url",
|
||||
"isNullable": true
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"name": "xUrl",
|
||||
"label": "X URL",
|
||||
"targetColumnMap": {
|
||||
"text": "X URL",
|
||||
"link": "xUrl"
|
||||
},
|
||||
"description": "X URL of the person",
|
||||
"icon": "url",
|
||||
"isNullable": true
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"name": "avatarUrl",
|
||||
"label": "Avatar URL",
|
||||
"targetColumnMap": {
|
||||
"text": "Avatar URL",
|
||||
"link": "avatarUrl"
|
||||
},
|
||||
"description": "Avatar URL of the person",
|
||||
"icon": "url",
|
||||
"isNullable": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,5 +1,7 @@
|
||||
import companyObject from './companies.metadata.json';
|
||||
import companyObject from './companies/companies.metadata.json';
|
||||
import personObject from './people/people.metadata.json';
|
||||
|
||||
export const standardObjectsMetadata = {
|
||||
companyV2: companyObject,
|
||||
personV2: personObject,
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import companySeeds from './companies.seeds.json';
|
||||
import companySeeds from './companies/companies.seeds.json';
|
||||
|
||||
export const standardObjectsSeeds = {
|
||||
companyV2: companySeeds,
|
||||
|
||||
@ -67,7 +67,7 @@ export class TenantInitialisationService {
|
||||
* @param dataSourceMetadataId
|
||||
* @param workspaceId
|
||||
*/
|
||||
private async createObjectsAndFieldsMetadata(
|
||||
public async createObjectsAndFieldsMetadata(
|
||||
dataSourceMetadataId: string,
|
||||
workspaceId: string,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user