feat: enhance database management with new migration and database node functionalities, including CRUD operations and test cases
This commit is contained in:
@ -1,9 +1,14 @@
|
||||
import { DatabaseManagerModule } from "src/databaseManager/database/database.manager.module";
|
||||
import { forwardRef, Module } from "@nestjs/common";
|
||||
import { MigrationService } from "./migration.service";
|
||||
import { DatabaseModule } from "src/database/database.module";
|
||||
import { TypeOrmModule } from "@nestjs/typeorm";
|
||||
import { Migration } from "../entities/migration.entity";
|
||||
|
||||
@Module({
|
||||
imports: [forwardRef(() => DatabaseModule)],
|
||||
imports: [
|
||||
forwardRef(() => DatabaseManagerModule),
|
||||
TypeOrmModule.forFeature([Migration]),
|
||||
],
|
||||
controllers: [],
|
||||
providers: [MigrationService],
|
||||
exports: [MigrationService],
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Inject, Injectable } from "@nestjs/common";
|
||||
import { Injectable, forwardRef, Inject } from "@nestjs/common";
|
||||
import { IsNull, Not, Repository } from "typeorm";
|
||||
import { Migration } from "../entities/migration.entity";
|
||||
import { InjectRepository } from "@nestjs/typeorm";
|
||||
@ -9,7 +9,7 @@ export class MigrationService {
|
||||
constructor(
|
||||
@InjectRepository(Migration)
|
||||
private readonly migrationRepository: Repository<Migration>,
|
||||
@Inject(DatabaseManagerService)
|
||||
@Inject(forwardRef(() => DatabaseManagerService))
|
||||
private readonly databaseService: DatabaseManagerService
|
||||
) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user