Convert metadata tables to camelCase (#2400)
* Convert metadata tables to camelCase * datasourcemetadataid to datasourceid * refactor metadata folders * fix command * move commands out of metadata * fix seed * rename objectId and fieldId in objectMetadataId and fieldMetadataId in FE * fix field-metadata * Fix * Fix * remove logs --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -7,7 +7,7 @@ import { PipelineStageService } from 'src/core/pipeline/services/pipeline-stage.
|
||||
import { PersonService } from 'src/core/person/person.service';
|
||||
import { CompanyService } from 'src/core/company/company.service';
|
||||
import { PipelineProgressService } from 'src/core/pipeline/services/pipeline-progress.service';
|
||||
import { TenantInitialisationService } from 'src/metadata/tenant-initialisation/tenant-initialisation.service';
|
||||
import { TenantManagerService } from 'src/tenant-manager/tenant-manager.service';
|
||||
|
||||
import { WorkspaceService } from './workspace.service';
|
||||
|
||||
@ -43,7 +43,7 @@ describe('WorkspaceService', () => {
|
||||
useValue: {},
|
||||
},
|
||||
{
|
||||
provide: TenantInitialisationService,
|
||||
provide: TenantManagerService,
|
||||
useValue: {},
|
||||
},
|
||||
],
|
||||
|
||||
@ -10,7 +10,7 @@ import { PipelineStageService } from 'src/core/pipeline/services/pipeline-stage.
|
||||
import { PipelineService } from 'src/core/pipeline/services/pipeline.service';
|
||||
import { PrismaService } from 'src/database/prisma.service';
|
||||
import { assert } from 'src/utils/assert';
|
||||
import { TenantInitialisationService } from 'src/metadata/tenant-initialisation/tenant-initialisation.service';
|
||||
import { TenantManagerService } from 'src/tenant-manager/tenant-manager.service';
|
||||
|
||||
@Injectable()
|
||||
export class WorkspaceService {
|
||||
@ -21,7 +21,7 @@ export class WorkspaceService {
|
||||
private readonly personService: PersonService,
|
||||
private readonly pipelineStageService: PipelineStageService,
|
||||
private readonly pipelineProgressService: PipelineProgressService,
|
||||
private readonly tenantInitialisationService: TenantInitialisationService,
|
||||
private readonly tenantManagerService: TenantManagerService,
|
||||
) {}
|
||||
|
||||
// Find
|
||||
@ -64,7 +64,7 @@ export class WorkspaceService {
|
||||
});
|
||||
|
||||
// Create workspace schema
|
||||
await this.tenantInitialisationService.init(workspace.id);
|
||||
await this.tenantManagerService.init(workspace.id);
|
||||
|
||||
// Create default companies
|
||||
const companies = await this.companyService.createDefaultCompanies({
|
||||
@ -161,7 +161,7 @@ export class WorkspaceService {
|
||||
this.delete({ where: { id: workspaceId } }),
|
||||
]);
|
||||
|
||||
await this.tenantInitialisationService.delete(workspaceId);
|
||||
await this.tenantManagerService.delete(workspaceId);
|
||||
|
||||
return workspace;
|
||||
}
|
||||
|
||||
@ -4,9 +4,9 @@ import { FileUploadService } from 'src/core/file/services/file-upload.service';
|
||||
import { PipelineModule } from 'src/core/pipeline/pipeline.module';
|
||||
import { CompanyModule } from 'src/core/company/company.module';
|
||||
import { PersonModule } from 'src/core/person/person.module';
|
||||
import { TenantInitialisationModule } from 'src/metadata/tenant-initialisation/tenant-initialisation.module';
|
||||
import { AbilityModule } from 'src/ability/ability.module';
|
||||
import { PrismaModule } from 'src/database/prisma.module';
|
||||
import { TenantManagerModule } from 'src/tenant-manager/tenant-manager.module';
|
||||
|
||||
import { WorkspaceService } from './services/workspace.service';
|
||||
import { WorkspaceMemberService } from './services/workspace-member.service';
|
||||
@ -19,7 +19,7 @@ import { WorkspaceResolver } from './resolvers/workspace.resolver';
|
||||
PipelineModule,
|
||||
CompanyModule,
|
||||
PersonModule,
|
||||
TenantInitialisationModule,
|
||||
TenantManagerModule,
|
||||
PrismaModule,
|
||||
],
|
||||
providers: [
|
||||
|
||||
Reference in New Issue
Block a user