feat: add Jinshuju student sync
All checks were successful
CI / check (pull_request) Successful in 2m14s
All checks were successful
CI / check (pull_request) Successful in 2m14s
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
|
||||
|
||||
export class AddJinshujuMatchRules1784700000000 implements MigrationInterface {
|
||||
async up(queryRunner: QueryRunner): Promise<void> {
|
||||
if (await queryRunner.hasTable('jinshuju_match_rules')) return;
|
||||
|
||||
await queryRunner.createTable(
|
||||
new Table({
|
||||
name: 'jinshuju_match_rules',
|
||||
columns: [
|
||||
{
|
||||
name: 'id',
|
||||
type: 'integer',
|
||||
isPrimary: true,
|
||||
isGenerated: true,
|
||||
generationStrategy: 'increment',
|
||||
},
|
||||
{ name: 'name', type: 'varchar', length: '100' },
|
||||
{ name: 'form_token', type: 'varchar', length: '64' },
|
||||
{ name: 'mappings', type: 'text' },
|
||||
{ name: 'created_at', type: 'datetime', default: 'CURRENT_TIMESTAMP' },
|
||||
{ name: 'updated_at', type: 'datetime', default: 'CURRENT_TIMESTAMP' },
|
||||
],
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
async down(queryRunner: QueryRunner): Promise<void> {
|
||||
if (await queryRunner.hasTable('jinshuju_match_rules')) {
|
||||
await queryRunner.dropTable('jinshuju_match_rules');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user