This repository has been archived on 2026-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
ServerSpacebarOld/src/util/migration/mysql/1721298824927-webhookMessageProperties.ts
2024-07-18 12:52:00 +02:00

24 lines
653 B
TypeScript

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`");
}
}