feat(server): add data migration system

This commit is contained in:
forehalo
2023-10-27 17:31:52 +08:00
parent ae6376edee
commit 98d0ac3c90
11 changed files with 466 additions and 67 deletions

View File

@@ -0,0 +1,18 @@
import { Logger, Module } from '@nestjs/common';
import { CommandFactory } from 'nest-commander';
import { PrismaModule } from '../prisma';
import { CreateCommand, NameQuestion } from './commands/create';
import { RevertCommand, RunCommand } from './commands/run';
@Module({
imports: [PrismaModule],
providers: [NameQuestion, CreateCommand, RunCommand, RevertCommand],
})
class AppModule {}
async function bootstrap() {
await CommandFactory.run(AppModule, new Logger());
}
await bootstrap();