localhost_oa_based/src/migrations/1707996695540-initData.ts

16 lines
443 B
TypeScript
Raw Normal View History

2024-02-28 08:32:35 +08:00
import fs from 'node:fs'
import path from 'node:path'
import { MigrationInterface, QueryRunner } from 'typeorm'
const sql = fs.readFileSync(path.join(__dirname, '../../deploy/sql/nest_admin.sql'), 'utf8')
export class InitData1707996695540 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(sql)
}
public async down(queryRunner: QueryRunner): Promise<void> {
}
}