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:
@ -4,16 +4,17 @@ import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { IsNull, Repository } from 'typeorm';
|
||||
|
||||
import {
|
||||
TenantMigration,
|
||||
TenantMigrationEntity,
|
||||
TenantMigrationTableAction,
|
||||
} from './tenant-migration.entity';
|
||||
} from 'src/database/typeorm/metadata/entities/tenant-migration.entity';
|
||||
|
||||
import { standardMigrations } from './standard-migrations';
|
||||
|
||||
@Injectable()
|
||||
export class TenantMigrationService {
|
||||
constructor(
|
||||
@InjectRepository(TenantMigration, 'metadata')
|
||||
private readonly tenantMigrationRepository: Repository<TenantMigration>,
|
||||
@InjectRepository(TenantMigrationEntity, 'metadata')
|
||||
private readonly tenantMigrationRepository: Repository<TenantMigrationEntity>,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@ -60,7 +61,7 @@ export class TenantMigrationService {
|
||||
*/
|
||||
public async getPendingMigrations(
|
||||
workspaceId: string,
|
||||
): Promise<TenantMigration[]> {
|
||||
): Promise<TenantMigrationEntity[]> {
|
||||
return await this.tenantMigrationRepository.find({
|
||||
order: { createdAt: 'ASC' },
|
||||
where: {
|
||||
@ -79,7 +80,7 @@ export class TenantMigrationService {
|
||||
*/
|
||||
public async setAppliedAtForMigration(
|
||||
workspaceId: string,
|
||||
migration: TenantMigration,
|
||||
migration: TenantMigrationEntity,
|
||||
) {
|
||||
await this.tenantMigrationRepository.save({
|
||||
id: migration.id,
|
||||
|
||||
Reference in New Issue
Block a user