protocol base data
This commit is contained in:
parent
5c4e521bd8
commit
edc35f2f87
7 changed files with 73 additions and 1 deletions
38
src/migrations/1728037129072-protocolBase.ts
Normal file
38
src/migrations/1728037129072-protocolBase.ts
Normal 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");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue