iceshrimp/packages/backend/src/migration/1645340161439-remove-max-note-text-length.ts
2023-10-13 18:44:25 +02:00

16 lines
508 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class removeMaxNoteTextLength1645340161439 implements MigrationInterface {
name = "removeMaxNoteTextLength1645340161439";
async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "meta" DROP COLUMN "maxNoteTextLength"`,
);
}
async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "meta" ADD "maxNoteTextLength" integer NOT NULL DEFAULT '500'`,
);
}
}