sync and create change

This commit is contained in:
Julian Krauser 2024-10-15 16:25:42 +02:00
parent 5f434c943e
commit e1ad491e68
16 changed files with 285 additions and 39 deletions

View file

@ -0,0 +1,101 @@
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
export class ProtocolTableTypes1728999487170 implements MigrationInterface {
name = "ProtocolTableTypes1728999487170";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.changeColumn(
"protocol",
"summary",
new TableColumn({
name: "summary",
type: "text",
default: "''",
isNullable: false,
})
);
await queryRunner.changeColumn(
"protocol_agenda",
"context",
new TableColumn({
name: "context",
type: "text",
default: "''",
isNullable: false,
})
);
await queryRunner.changeColumn(
"protocol_decision",
"context",
new TableColumn({
name: "context",
type: "text",
default: "''",
isNullable: false,
})
);
await queryRunner.changeColumn(
"protocol_voting",
"context",
new TableColumn({
name: "context",
type: "text",
default: "''",
isNullable: false,
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.changeColumn(
"protocol",
"summary",
new TableColumn({
name: "summary",
type: "varchar",
length: "255",
default: "''",
isNullable: false,
})
);
await queryRunner.changeColumn(
"protocol_agenda",
"context",
new TableColumn({
name: "context",
type: "varchar",
length: "255",
default: "''",
isNullable: false,
})
);
await queryRunner.changeColumn(
"protocol_decision",
"context",
new TableColumn({
name: "context",
type: "varchar",
length: "255",
default: "''",
isNullable: false,
})
);
await queryRunner.changeColumn(
"protocol_voting",
"context",
new TableColumn({
name: "context",
type: "varchar",
length: "255",
default: "''",
isNullable: false,
})
);
}
}