Revert "Convert metadata tables to camelCase" (#2419)

Revert "Convert metadata tables to camelCase (#2400)"

This reverts commit 1cf08c797f.
This commit is contained in:
Charles Bochet
2023-11-10 11:48:44 +01:00
committed by GitHub
parent 1cf08c797f
commit 7b9175a4a4
238 changed files with 2253 additions and 1852 deletions

View File

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