summary refs log tree commit diff
path: root/src/util/migration/postgres/1721298824927-webhookMessageProperties.ts
blob: bd603f10f464cef5723a82e8d9372ce165e82e16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { MigrationInterface, QueryRunner } from "typeorm";

export class WebhookMessageProperties1721298824927
	implements MigrationInterface
{
	name = "WebhookMessageProperties1721298824927";

	public async up(queryRunner: QueryRunner): Promise<void> {
		await queryRunner.query("ALTER TABLE messages ADD username text NULL");
		await queryRunner.query("ALTER TABLE messages ADD avatar text NULL");
	}

	public async down(queryRunner: QueryRunner): Promise<void> {
		await queryRunner.query("ALTER TABLE messages DROP COLUMN username");
		await queryRunner.query("ALTER TABLE messages DROP COLUMN avatar");
	}
}