summary refs log tree commit diff
path: root/src/database/migration/postgres/1720157926878-messagePollObject.ts
blob: bd21c6e56e4c9b768f1208fc917368d49db25eef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { MigrationInterface, QueryRunner } from "typeorm";

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

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

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