Skip to content

Commit 672b18a

Browse files
committed
chore: add migrations
1 parent 145ffa2 commit 672b18a

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

platforms/cerberus/src/database/entities/Group.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ export class Group {
2828
@Column("simple-array", { nullable: true })
2929
admins!: string[];
3030

31+
@Column({ nullable: true})
32+
ename!: string
33+
3134
@Column({ type: "text", nullable: true })
3235
charter!: string; // Markdown content for the group charter
3336

platforms/evoting-api/src/database/entities/Group.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ export class Group {
5858
})
5959
participants!: User[];
6060

61+
@Column({ nullable: true})
62+
ename: string
63+
6164
@Column({ nullable: true })
6265
avatarUrl!: string;
6366

platforms/pictique-api/src/database/entities/Chat.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ export class Chat {
3030
})
3131
participants!: User[];
3232

33+
@Column({ nullable: true })
34+
ename!: string;
35+
3336
@CreateDateColumn()
3437
createdAt!: Date;
3538

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { MigrationInterface, QueryRunner } from "typeorm";
2+
3+
export class Migration1756065162697 implements MigrationInterface {
4+
name = 'Migration1756065162697'
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`ALTER TABLE "chat" ADD "ename" character varying`);
8+
}
9+
10+
public async down(queryRunner: QueryRunner): Promise<void> {
11+
await queryRunner.query(`ALTER TABLE "chat" DROP COLUMN "ename"`);
12+
}
13+
14+
}

0 commit comments

Comments
 (0)