summary refs log tree commit diff
path: root/src/util/migration/postgres
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2024-08-08 14:18:29 -0400
committerGitHub <noreply@github.com>2024-08-08 14:18:29 -0400
commit9d2f97a92ab238b2dddde27710f98b7adf6b9b98 (patch)
treed426e44431b6bc09c9292a525489424249ef034d /src/util/migration/postgres
parentMerge pull request #1156 from DEVTomatoCake/fix/messages-before-param (diff)
parentMerge branch 'master' into feat/webhooks-3 (diff)
downloadserver-ts-9d2f97a92ab238b2dddde27710f98b7adf6b9b98.tar.xz
Merge pull request #1149 from DEVTomatoCake/feat/webhooks-3
Support webhooks
Diffstat (limited to 'src/util/migration/postgres')
-rw-r--r--src/util/migration/postgres/1721298824927-webhookMessageProperties.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/migration/postgres/1721298824927-webhookMessageProperties.ts b/src/util/migration/postgres/1721298824927-webhookMessageProperties.ts
new file mode 100644

index 000000000..bd603f10f --- /dev/null +++ b/src/util/migration/postgres/1721298824927-webhookMessageProperties.ts
@@ -0,0 +1,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"); + } +}