protocol base data

This commit is contained in:
Julian Krauser 2024-10-04 12:47:13 +02:00
parent 5c4e521bd8
commit edc35f2f87
7 changed files with 73 additions and 1 deletions

View file

@ -0,0 +1,38 @@
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
export class ProtocolBase1728037129072 implements MigrationInterface {
name = "ProtocolBase1728037129072";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumn(
"protocol",
new TableColumn({
name: "starttime",
type: "timestamp",
isNullable: false,
})
);
await queryRunner.addColumn(
"protocol",
new TableColumn({
name: "endtime",
type: "timestamp",
isNullable: false,
})
);
await queryRunner.addColumn(
"protocol",
new TableColumn({
name: "summary",
type: "text",
isNullable: false,
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn("protocol", "summary");
await queryRunner.dropColumn("protocol", "endtime");
await queryRunner.dropColumn("protocol", "starttime");
}
}